3

We have a requirement to prevent changes to a contract record once active unless the you are a contract admin, which can span multiple profiles. I'm trying to accomplish this by using a custom permission assigned to a permission set. I have created the custom permission, added it to a permission set and assigned the permission set to a user.

When logged in as that user, I try to modify the contract record and receive the error that is from my validation rule. When looking at the debug logs, the custom permission is evaluated as Null:

ISPICKVAL(Status,'Active'),
 NOT(ISCHANGED(ExternalContractNumber__c)),
 NOT(ISCHANGED( ExternalContractID__c )),
 NOT(ISCHANGED(Status))
),
AND(OR(
(ISCHANGED(Tail_Number__c)),
 NOT(ISCHANGED(Repurchase_Date__c))),
NOT($Permission.CP_Contract_Update)
)))

|Status=Active , Tail_Number__c=23124abc , $Profile.Name=AirCare ,
**$Permission.CP_Contract_Update=null** , ExternalContractID__c=2352353425345 , ExternalContractNumber__c=124235235235 , Repurchase_Date__c=null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.