bean->save() fails when modules has before_save hook

So I’m trying to automatically create some related records in one module. Currently in the process_record hook for contacts.
This checks for missing relationships to my custom module and will create any missing relationships and create a new bean.

However when the related module has a before_save hook to update the bean->name the system falls over. I’ve even tried creating a blank method on the before_save hook and this still causes problems and crashes suitecrm.

Is there any advice for what I’m doing wrong?

What do you mean by checking missing relationship and creating it if missing?
the process_record will be executed for each record during listview.

if before_save fails then there has to be something wrong in your customization. Check your suitecrm and apache logs for the culprit

Fully right, I was just starting to turn on logging for php, suitecrm.log showed nothing.

It was a very simple oversight … two classes with the same name… :unsure: :unsure:

All seems to be working fine now :cheer: :cheer:

Good to know. :slight_smile: