after_relationship_add logic hook run only for subpanel.

Hello developers,

I’m creating after_relationship_add logic hook for account and contact.
I have requirement were I need to update contact field when I select contact from subpanel in account.
I have write after_relationship_add logichook in account and it work like charm, but problem is when i create new contact and select account it is giving me database failure error. I want to block this logic hook for create new contact record.

Can you share your logic hook code, and the exact error?

Normally, from the hook parameters, you can tell the difference between one situation and the other, and make your code run conditionally.