Meeting save order

I had a meeting workflow running for years. Basically, on save (from AOW) it updates a field in the related contact with the meeting date. That triggers something else.

Anway it started crashing out after update to 7.15. I noticed that after crash the meeting gets created but the creator is not an attendee. Also, this only happens if the meeting is created from the contact record. If I create the meeting from the meetings module. No issue.

The crash is happening I think because the relation between the meeting and the contact is not created yet when the workflow runs to update a field in the related contact.

I solved it by moving the AOW from on save to in the scheduler, now everything works fine.

However, does anyone know if the save order was changed up? Where is AOW on save supposed to run? Before or after relationship add?

Is this a correct sequence?

  • Bean save (before_save)
  • Bean written to DB
  • after_save hooks fire
  • AOW “On Save” evaluates/actions execute
  • Related links/subpanel relationships may then be persisted
  • after_relationship_add fires

after_save

Fired after a record is saved. Note that due to some peculiarities some related modules may not be persisted to the database. The logic hook is fired within the SugarBean classes save method. Some implementing classes may save related beans after this method returns. A notable example of this is the saving of email addresses in Company modules.