0

Since the OpportunityContactRole object is not a first class object you cannot create a trigger on the object, nor add fields or create a validation rule. Is it possible to prevent the deletion of an opportunity contact role record that is inserted during lead conversion and marked as primary using a trigger? I need to identify an opportunity contact role record that is created during lead conversion and marked as primary and prevent that record from being deleted and lock it down.

0

I think the only workaround is to change your business process to use a custom lookup field on Opportunity to fulfill your primary contact functionality. When users modify the lookup field, an opp trigger can create / modify the appropriate opportunity contact role record.

Of course there's still no good way to deal with the situation where a user deletes the opp contact role, but at least the lookup field value will remain, plus you can use field history tracking on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.