You need to sign in to do that
Don't have an account?
Inna Kersman
Apex code help please - what does it mean?
Hi,
Could someone please explain to me in plain English what the attached piece of code does? I'm trying to identify what's triggering the Collision detection error and if it's safe to deactivate this trigger (screenshot attached).
Thanks in advance.
Could someone please explain to me in plain English what the attached piece of code does? I'm trying to identify what's triggering the Collision detection error and if it's safe to deactivate this trigger (screenshot attached).
Thanks in advance.
If you have not placed the /* and */ at start and end, then the trigger does nothing. If that was you testing, then:
For any opportunity that triggers the code,
If there is a primary contact, check in the OpportunityContactRoles for that primary contact already having a OCR of "Key Sales Contact".
If no such OCR exists, create one for the primary contact and associate it with the opportunity.
If there is an invoicing contact, check in the OpportunityContactRoles for that invoicing contact already having a OCR of "Invoicing Contact".
If no such OCR exists, create one for the invoicing contact and associate it with the opportunity.
HTH
Regards
Andrew