• Yanick Nantchouang 6
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi All,

We are looking to automate the creation of Opportunity Splits on each opportunity as we cannot trust Sales Reps to add the Opportunity Team and Opportunity Splits accurately. So we decided to automate these through a trigger.

1- We can add and remove the 3 members to the Opportunity Team no problem.
2- When attempting to add the 3 members with the following percentages to the Opportunity Splits: 80%, 10%, 10%, we get an error suggesting that the percentages don't add up to 100% .

FULL ERROR MESSAGE: "caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Can't update splits: percentages don't add up to 100.00%.: []: Class.CreateOppoTeamMember.CreateOppoSlpits: line 187, column 1"

Any help to resolve this will be greatly appreciated

 
Hi,

It is possible to create a trigger on OpportunityTeamMember objecy. However, I want to automate creation of coresponding Opportunity Splits on creation of OpportunityTeamMember. Correct me if I'm wrong, but it seems like the event in which an opportunity is created or updated with a new owner, and therefore a new OpportunityTeamMember is created for the new owner and all his default opportunity team (if exist) automatically, is not an action recognized as INSERT of OpportunityTeamMember, therefore does not fire the insert trigger.

Is this correct?

Thank you,
Eran

Hi All,

 

I need to write a after insert trigger on Opportunity Team Member object to create a Opportunity Split.

 

For example, if we have 2 members in Opportunity Team member then it should be 50% each.

 

Please help me it's urgent.

 

Thanks,

Sachin.