Announcement

Collapse
No announcement yet.

Task reminders with formula

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

  • Task reminders with formula

    I am trying to create a task, with reminder 'on time' with entity formula.

    I have :
    PHP Code:
    $TaskName string\concatenate(name' - 'client.name);
    $TaskDueDate string\concatenate(nextRenewal' 11:30:00');
    record\create('Task',
    'name'$TaskName,
    'dateEnd'$TaskDueDate,
    'assignedUserId'assignedUserId
        
    )​ 
    But I have no way to set a 'on time' reminder.

    any ideas?

    *no advanced pack
    Last edited by Emmker; 03-24-2024, 10:50 PM.

  • #2
    In order to understand how to form certain entities in the system, take a look at the Chrome inspector. I think the above screenshot will help. A positive value means time "before" the event
    Attached Files

    Comment


    • Emmker
      Emmker commented
      Editing a comment
      I did just that, but I cannot find a way to translate it in formula script.

  • #3
    Hi Emmker,

    Try to use the following formula script:
    Code:
    $taskName = string\concatenate(name, ' - ', client.name);
    $taskDueDate = string\concatenate(nextRenewal, ' 11:30:00');
    
    $taskId = record\create(
      'Task',
      'name', $taskName,
      'dateEnd', $taskDueDate,
      'assignedUserId', assignedUserId
    )​;
    
    $reminderId = record\create(
        'Reminder',
        'entityId', $taskId,
        'entityType', 'Task',
        'type', 'Popup',
        'userId', assignedUserId,
        'seconds', 0
    );​
    ​​

    Comment


    • #4
      Originally posted by lazovic View Post
      Hi Emmker,

      Try to use the following formula script:
      Code:
      $taskName = string\concatenate(name, ' - ', client.name);
      $taskDueDate = string\concatenate(nextRenewal, ' 11:30:00');
      
      $taskId = record\create(
      'Task',
      'name', $taskName,
      'dateEnd', $taskDueDate,
      'assignedUserId', assignedUserId
      )​;
      
      $reminderId = record\create(
      'Reminder',
      'entityId', $taskId,
      'entityType', 'Task',
      'type', 'Popup',
      'userId', assignedUserId,
      'seconds', 0
      );​
      ​​
      That worked like a charm.

      I just realised that reminder is its own entity.

      Thank you very much

      Comment

      Working...
      X