Set reminders in task

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anatoleq
    Junior Member
    • Oct 2018
    • 15

    Set reminders in task

    Hi, I'm just started with EspoCRM and while creating a Task want to set reminders in this task (as in code below). Task is created, but reminder is not set. Thanks in advance.
    PHP Code:
    $newtask ->set(array(
        'name' => 'Name',
        'priority' => 'High',
        'status' => 'Started',
        'dateStartDate' => date("Y-m-d"),
        'dateEnd' => date("Y-m-d H:i:s", mktime(0, 0, 0, date("m")+1, date("d"), date("Y"))),
        'description' => 'Description',
        'reminders' => array('type' => 'Popup', 'seconds' => 0)
    )); 
    
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    reminders:[{seconds: 0, type: "Email"}, {seconds: 0, type: "Popup"}, {seconds: 120, type: "Popup"}] in API
    'reminders' => array((object)['type' => 'Popup', 'seconds' => 0]) in your usage

    Comment

    • Anatoleq
      Junior Member
      • Oct 2018
      • 15

      #3
      Thanks Tanya, works perfectly!

      Comment

      Working...