function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger ValidateDuplicateRole on OpportunityTeamMember (before insert, before update) { for( OpportunityTeamMember otm : trigger.new ) { if( otm.TeamMemberRole != null && otm.UserId != null ) { otm.Unique_Opp_Role__c = '' + otm.OpportunityId + otm.TeamMemberRole; } } }
1. Create a Text Field and make it Unique => Unique_Opp_Role__c
2. Create a Trigger :