Goodmorning,
I have problem in my logic hook when create record from subpanel.
I have a subpanel in Accounts for my custom module.(one to many relationship)
In logic hook for my custom module, I use the id, of account record to made a query.
When I create a record (for my custom module) through the subpanel in Account module using the Full Form the bean value of the id contains the relationship link2 object rather than the related id string.
This causes a 500 error anytime and don’t create record. Can someone help me? Is there a workaround to fix this problem?
Thank you for your reply, but the problem is this:
In fact, in error.log file log, I have this error:
Recoverable fatal error: Object of class Link2 could not be converted to string in /var/www/html/custom/modules/myModule/myModuleLogicHook.php on line 129.
At this line I use $bean->account_id_c that contains an id string when I create a record from module. But contain a Link2 object if I create a record from the subpanel of account module
Correct… I try, and it works.
I ask for your opinion cause you know better than me, SuiteCRM, and I would like to have an opinion, if is a good solution or not…