I would really appriceate if anyone can help we with a validation rule Requirement is depending on the below field status only system admin should be able to unlock the record or change status from submitted to save

field1  Sample checkbox is True
field 2 Status  picklist value is submitted
field 3 unlock checkbox only by System Admin
  • What have to tried so far?
    – EricSSH
    Dec 11 '15 at 21:15
  • AND((Is_Sampled_Call_vod__c)) || (ISPICKVAL(Status_vod__c, "Submitted_vod"))&& NOT(CONTAINS( $Profile.Name , "System Administrator" ))
    – Mirza
    Dec 11 '15 at 21:36
  • this works but even if the filed (Is_Sampled_Call_vod__c = false) it won't allow to update AND(Is_Sampled_Call_vod__c = TRUE, (TEXT(Status_vod__c) = "Submitted")) && $Profile.Name <> "System Administrator"
    – Mirza
    Dec 11 '15 at 21:46
  • I just need help to add a condition to this validation rule IF Is_Sampled_Call_vod__c is TRUE then only admin can update ISCHANGED( Status_vod__c) && NOT(CONTAINS( $Profile.Name , "System Administrator" ))
    – Mirza
    Dec 11 '15 at 22:26
  • Is this more of a sharing problem? If state A, anyone can edit the record. If state B, only the administrator can edit the record. Can you use workflow or process builder to toggle the owner back and forth between a group and the System Administrator? (System Administrators will always have edit capabilities anyway.)
    – pchittum
    Dec 11 '15 at 23:21

It should just be a matter of adding the field with && to your validation rule, since checkboxes are boolean values you can just do the following:

Is_Sampled_Call_vod__c && ISCHANGED( Status_vod__c) && NOT(CONTAINS( $Profile.Name , "System Administrator" ))
  • thanks for responding Jenny, I tried and it did not worked wondering do I have to use a IF statement or something else?
    – Mirza
    Dec 13 '15 at 18:23
  • @Mirza no need for if statement, maybe try one condition at a time to see where it's getting stuck. Just have that field to start with and add on from there.
    – Jenny B
    Dec 13 '15 at 21:15
  • It worked on a different field (text) Signature_vod__c <> "" && ISCHANGED(Status_vod__c) && (CONTAINS( $Profile.Name , "GILD - NA US Comm Ops - Read Only" ))
    – Mirza
    Dec 18 '15 at 0:33
  • I wonder why it wont work on the check box field (Is_Sampled_Call_vod__c) Is_Sampled_Call_vod__c && ISCHANGED( Status_vod__c) && NOT(CONTAINS( $Profile.Name , "System Administrator" ))
    – Mirza
    Dec 18 '15 at 0:36
  • Did u try the checkbox by itself because it for sure works, take a look at developer.salesforce.com/trailhead/module/advanced_formulas first unit has examples.
    – Jenny B
    Dec 18 '15 at 0:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.