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



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

               $newCall = BeanFactory::newBean('Calls');
               $newCall->date_start="2017-06-15 06:00:00";
               $newCall->date_end="2017-06-15 06:05:00";



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