AnsweredAssumed Answered

Creating Record Inside Logic Hook

Question asked by sidhu sidhu on Jul 25, 2017
Latest reply on Jul 25, 2017 by Francesca Shiekh

Hi All,

 

          I wanted to create another call from the call logichook.

 

Here is my code

<?php

require_once('data/BeanFactory.php');


class callActivity
{
    
     function callActivity($bean, $event, $arguments)

          { 
               $bean->description=$bean->date_start;    
              
               $newCall = BeanFactory::newBean('Calls');
               $newCall->name="test";
               $newCall->date_start="2017-06-15 06:00:00";
               $newCall->date_end="2017-06-15 06:05:00";
               $newCall->save();
          }
}









 

 

after i save i dont get any logs

but on the browser it shows

Error There was an error while connecting to the server. Please try again.

 

And on the developer tools console it shows

 

Failed to load <>/rest/v10/Calls/a97779da-475a-11e7-97ac-f01fafe4cd6f?all_recurrences=true&viewed=1
resource: the server responded with a status of 504 (Timeout while reading response from Server)

 

 

How can i fix this.The logichook was working fine without the above code.

André Lopes Francesca Shiekh hats

 

 

Regards

Sidhu

Outcomes