Salesforce Certified Platform App Builder — Question 476
Cloud Kicks wants to make sure that users without the Marketing role are unable to update the Contact Retail Opt In picklist field to Yes.
What validation rule would an app builder use to prevent other users from making this update?
Answer options
- A. AND( $UserRole.Name != 'Marketing', Retail_Opt_In__c = ג€Yesג€ )
- B. AND( $UserRole.Name = 'Marketing', Retail_Opt_In__c = ג€Yesג€ )
- C. AND( $UserRole.Name = 'Marketing', ISPICKVAL(Retail_Opt_In__c = ג€Yesג€ ) )
- D. AND( $UserRole.Name = 'Marketing', ISCHANGED(Retail_Opt_In__c), ISPICKVAL(Retail_Opt_In__c = ג€Yesג€ ) )
Correct answer: D
Explanation
The correct answer is D because it checks if the Retail Opt In field is being changed and ensures that only users with the Marketing role can make that change to Yes. Option A incorrectly allows changes from users without the Marketing role, while B and C do not prevent the change from non-Marketing users effectively.