Announcement

Collapse
No announcement yet.

Can we Create Pop Up Reminder from Workflow ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we Create Pop Up Reminder from Workflow ?

    Hello Team, Is there any way we can create popup reminder from workflow ?
    Thanks in Advance

  • #2
    Hi,

    think so : all is entity... so reminder is entity. just create a record entityType = reminder, type = PopUp (look database how is this enum field)
    i don't know diff of startAt and remindAt. .:s .. the other field is easy to understand
    but look this code :

    PHP Code:
    <?php
                    $reminderId 
    Util::generateId();

                    
    $query $this->entityManager
                        
    ->getQueryBuilder()
                        ->
    insert()
                        ->
    into(Reminder::ENTITY_TYPE)
                        ->
    columns([
                            
    'id',
                            
    'entityId',
                            
    'entityType',
                            
    'type',
                            
    'userId',
                            
    'remindAt',
                            
    'startAt',
                            
    'seconds'
                        
    ])
                        ->
    values([
                            
    'id' => $reminderId,
                            
    'entityId' => $entity->getId(),
                            
    'entityType' => $entityType,
                            
    'type' => $type,
                            
    'userId' => $userId,
                            
    'remindAt' => $remindAt->format(DateTimeUtil::SYSTEM_DATE_TIME_FORMAT),
                            
    'startAt' => $dateValue,
                            
    'seconds' => $seconds,
                        ])
                        ->
    build();

                    
    $this->entityManager->getQueryExecutor()->execute($query);

    sample :

    record\create("Reminder", "entityId", id, "entityType", "Account", .....)
    Last edited by item; 03-12-2023, 08:16 PM.

    Comment


    • #3
      Hello, there is an action in workflows called "Create Notification". I think that is what you are looking for.
      Attached Files

      Comment


      • #4
        No i am looking for popup reminder .

        Comment


        • #5
          Originally posted by yubrajkafle View Post
          Hello Team, Is there any way we can create popup reminder from workflow ?
          Thanks in Advance
          reminder for call/meeting correct ? if yes you can try this (assuming the target entity of the workflow is call/meeting):
          PHP Code:
          $id record\create('Reminder''entityId'id'entityType''Call'type'Popup''userId'assignedUserId'remindAt'datetime\addMinutes(dateStart, -20), 'startAt'datetime\addMinutes(dateStart, -15), 'seconds'900); 
          Rabii
          Web Dev

          Comment


          • sapyantuk
            sapyantuk commented
            Editing a comment
            Reminder for other Entity not for call/meeting. I need to create Reminder for other Entity Like Base and Baseplus and Company

          • rabii
            rabii commented
            Editing a comment
            you Can use the same code above but just change 'Reminder' with the name of the entity you are targeting. i have tried this code and it works even for other entities like Lead or Custom entities.

          • abidoss
            abidoss commented
            Editing a comment
            The code works fine, except that the pop-ups keep appearing multiple times without stopping.

        • #6
          rabii I tried this code
          $id = record\create('Reminder', 'entityId', id, 'entityType', 'Account', type, 'Popup', 'userId', assignedUserId, 'remindAt', datetime\addMinutes(dateStart, -20), 'startAt', datetime\addMinutes(dateStart, -15), 'seconds', 900);


          its not working . Can you please guide me once

          Comment


          • rabii
            rabii commented
            Editing a comment
            did you use the code i formula. as mentioned this code works for call/meeting entity from what you posted you need to adjust this to your custom event entity.

        • #7
          Can you please help me with a problem we are facing in Espo CRM? We are unable to set reminders when creating a new record on an entity of event type using a workflow. Although we set reminders for pop up, they do not save. Can you tell us the actual issue and suggest a solution to fix this? Is there any other way we can achieve this in Espo CRM? Thank you.


          this is new case

          Click image for larger version

Name:	image.png
Views:	356
Size:	48.4 KB
ID:	90656


          Click image for larger version

Name:	image.png
Views:	325
Size:	34.1 KB
ID:	90657​​

          Comment


          • #8
            the reminders is supposed to be triggered before start date of your event entity and from you action you have set Date Start to now which means the reminders are in the past. try to make Date start now + 1 hour and it will create the reminders.
            Rabii
            Web Dev

            Comment


            • #9
              rabii I have tried setting up a workflow to create reminders within a record, but unfortunately, the reminders are not being created when I open the record. The reminders value is empty. Can you please provide the workflow setup for review so that I can identify and resolve the issue?

              Comment


              • #10
                sapyantuk,

                The functionality that allows you to use Reminders in custom Entities, as well as the functionality that allows you to create Reminders using Workflows is available in EspoCRM starting from version 7.4.
                It is important to know that in order for Reminders to be created and run correctly, it is necessary to specify the Assigned User.
                Attached Files
                Last edited by victor; 04-12-2023, 09:47 AM. Reason: On version 7.3 also works, but only with the specified Assigned User

                Comment


                • #11
                  There was no any change in v7.4 that changes how reminders work.

                  Comment


                  • #12
                    yuri victor

                    You can see . already specify Assigned User in my workflow. but reminders are not created. these is some issue

                    Click image for larger version

Name:	image.png
Views:	317
Size:	48.4 KB
ID:	90818


                    Click image for larger version

Name:	image.png
Views:	285
Size:	34.1 KB
ID:	90819​​

                    Comment


                    • #13
                      If no Reminder is created after the Workflow is executed, then most likely you have redundant Relationships between this Custom entity and entity Users. They are located in Administration -> Entity Manager -> Your_Entity_Name -> Relationships.

                      For example, I added a Many-to-Many between my test entity with event type and the Users entity and had a result close to yours:
                      - The record is created, the field values ​​are filled in correctly, but Reminders do not appear in the created record.

                      After deleting this Relationship, everything started working as it should.​​

                      Comment


                      • #14
                        Then what should be the relation between custom entity and users ?

                        Comment


                        • #15
                          Hi sapyantuk,

                          If you have a Many-to-Many relationship between the Update and the User entities, you don't need to remove it.
                          Just add at least one user in the Users field in the Create Record action of your Workflow so that the whole action looks like this:

                          Click image for larger version

Name:	image.png
Views:	333
Size:	52.6 KB
ID:	90827

                          Comment

                          Working...
                          X