You need to sign in to do that
Don't have an account?
Kalpana Dhanajayaraj
Help reg Validation Rule
Requirement : When Sales Channel = Partner, the Primary Agency field should contain a partner of type "Agency TS" or "RPO"
AND(
NOT( $Profile.Id = $Label.Profile_Sys_Admin_3rd_Party),
NOT( $Profile.Id = $Label.Profile_Sys_Admin_No_Cust),
OR
($RecordType.Id = $Label.RT_CorpSolutions,
$RecordType.Id = $Label.RT_CorpSolutions_Renewal ),
ISPICKVAL( Sales_Channel__c , "Partner") ,
OR(
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'Agency TS')),
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'RPO')))
)
I want the Validation Rule to fire only when both of the mulstiselect picklist value is not present.
Now it is firing even when one value is present.Record is getting saved when only both RPO and Agency TS are added.
Also i am not able to inlcude other values also.
How to get this corrected
AND(
NOT( $Profile.Id = $Label.Profile_Sys_Admin_3rd_Party),
NOT( $Profile.Id = $Label.Profile_Sys_Admin_No_Cust),
OR
($RecordType.Id = $Label.RT_CorpSolutions,
$RecordType.Id = $Label.RT_CorpSolutions_Renewal ),
ISPICKVAL( Sales_Channel__c , "Partner") ,
OR(
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'Agency TS')),
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'RPO')))
)
I want the Validation Rule to fire only when both of the mulstiselect picklist value is not present.
Now it is firing even when one value is present.Record is getting saved when only both RPO and Agency TS are added.
Also i am not able to inlcude other values also.
How to get this corrected
Try using the AND operator instead of OR Operator in your second OR Condition.Like Below
AND(
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'Agency TS')),
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'RPO')))
)
Let me know if you want any further help.
If those points are help means mark these as a best answer.
Thanks,
Raj
(Sweet Potato Tec)
I tried Using AND at first.
But it did not help.