• Zachery Tapp 10
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Apex noob here. I'm trying to clone an Opportunity and all Contact Roles on any insert or update on a closed won opportunity greater than $500. So, if the opportunity or contact roles are updated, added or deleted, I'd like the clone to inherit those new or updated roles. Is this even possible? I know you can't actually run a trigger on the OpportunityContactRole object - which would be the easiest - but I was wondering if I could effectively look for changes in that related list from the Opportunity object trigger and then run the clone logic there.

One thought I had was rather than trying to do it this way was to essentially add a button/checkbox to the opportunity and instruct users to check the box on the records they wanted cloned as this will be for prospecting in the next FY.

My question is - is that first one even possible? Is it possible to compare the related list size or look for changes in any efficient way. Like would I effectively have to loop through the contact roles before the insert/update and after the insert/update and compare all the fields on the contact role?
Apex noob here. I'm trying to clone an Opportunity and all Contact Roles on any insert or update on a closed won opportunity greater than $500. So, if the opportunity or contact roles are updated, added or deleted, I'd like the clone to inherit those new or updated roles. Is this even possible? I know you can't actually run a trigger on the OpportunityContactRole object - which would be the easiest - but I was wondering if I could effectively look for changes in that related list from the Opportunity object trigger and then run the clone logic there.

One thought I had was rather than trying to do it this way was to essentially add a button/checkbox to the opportunity and instruct users to check the box on the records they wanted cloned as this will be for prospecting in the next FY.

My question is - is that first one even possible? Is it possible to compare the related list size or look for changes in any efficient way. Like would I effectively have to loop through the contact roles before the insert/update and after the insert/update and compare all the fields on the contact role?