I am 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 I decided to automate these through a trigger.
I can add and remove the 3 members to the Opportunity Team no problem.
When attempting to add the 3 members with the following percentages to the Opportunity Splits: 80%, 10%, 10%, I 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"
Does anyone has experience this while attempting to do the same?
OpportunitySplitType.IsTotalValidated
defined? can you make this false and have code ensure %s add up to 100?