Hi, I'm getting the following error for my validation rule:
Error: Syntax error. Extra AND
$Profile.Name <> "Sport Team" AND
$Profile.Name <> "System Administrator" AND
Athlete__c = TRUE AND
!ISCHANGED(Athlete__c)
AND (
ISCHANGED (Email) OR ISCHANGED (Phone) OR
ISCHANGED (Sport__c) OR ISCHANGED (Sport_2__c) OR
ISCHANGED (Active__c) OR ISCHANGED (Age__c) OR
ISCHANGED (Birthdate) OR ISCHANGED (Contact__c) OR
ISCHANGED (Gender__c) OR ISCHANGED (Dietary_Requirements__c) OR
ISCHANGED (Title) OR ISCHANGED (Description) OR
ISCHANGED (Games_Attended__c) OR ISCHANGED ( Media_Appearances__c) OR
ISCHANGED (npe01__Type_of_Account__c) OR ISCHANGED (HomePhone) OR
ISCHANGED (Introduced_By__c) OR ISCHANGED (Type_of_social_impact_roles_undertaken__c)
)
Hi Aized,
Please try this below Validation Rule. Hopefully, it works.
AND($Profile.Name <> "Sport Team",
$Profile.Name <> "System Administrator",
Athlete__c = TRUE,
!ISCHANGED(Athlete__c),
OR(ISCHANGED(Email),
ISCHANGED(Phone),
ISCHANGED(Sport__c),
ISCHANGED(Sport_2__c),
ISCHANGED(Active__c),
ISCHANGED(Age__c),
ISCHANGED(Birthdate),
ISCHANGED(Contact__c),
ISCHANGED(Gender__c),
ISCHANGED(Dietary_Requirements__c),
ISCHANGED(Title),
ISCHANGED(Description),
ISCHANGED(Games_Attended__c),
ISCHANGED(Media_Appearances__c),
ISCHANGED(npe01__Type_of_Account__c),
ISCHANGED(HomePhone),
ISCHANGED(Introduced_By__c),
ISCHANGED(Type_of_social_impact_roles_undertaken__c)
)
)
Please mark this as the 'Best Answer' if you find this helpful so that it will help others too.
Thanks!