AnsweredAssumed Answered

How to get new related records in after_save logic hook?

Question asked by Asaf Army on Oct 20, 2014
Latest reply on Oct 23, 2014 by Asaf Army
When i create a new meeting in sugacrm, i want to create a new meeting in another system, including the related leads,contacts and users of that meeting.

The problem is that i don't have access to the related leads,contacts and users in "after_save" logic hook because they haven't related yet to the meeting. they only added later with the "after_relationship_add" logic_hook events.

is there any way i can know which leads,contacts,users where added to the meeting in "after_save" logic_hook?

becaue if i dont, and the user created a new meeting with invitees of two leads and two users, then it means i have to do 5 updates to the other system:
in "after_save" logic_hook - create the meeting in other system
in "after_relationship_add" - update the meeting in the other system with adding the lead to the meeting
in "after_relationship_add" - update the meeting in the other system with adding the other lead to the meeting
in "after_relationship_add" - update the meeting in the other system with adding the user to the meeting
in "after_relationship_add" - update the meeting in the other system with adding the other user to the meeting.

any ideas how to create a meeting in one update, in the other system?

i use:  Version 6.5.13 Community Edition

Outcomes