0

I have one question regarding Salesforce Record Type. I have two different user profile.

  1. Admin
  2. Manager

I have created record type for both users in which I control the status field (Picklist Value).

for Admin (New, Completed, Denied)

for Manager (New, Completed) and I assign the record type to users profile.

Example 1) login with admin create a new record I am able to see these values in the status field (New, Completed, Denied) it's fine I am ok with that.

Example 2) Login with manager create a new record I am able to see these values in the status field (New, Completed) and I choose completed from the status field and save the record. now again login with admin and edit the record I should able to the see Denied value but cannot see the Denied value in the status field why?

  • Have you created 2 record type or 1? And manger and Admin 2profie or 1? – Pranay Jaiswal Dec 14 '18 at 14:16
  • I have created 2 record types and manager and admin profile also different. – Faisal Dec 14 '18 at 14:20
  • Admin have access to both record types. – Faisal Dec 14 '18 at 14:21
6

The Record Type is an attribute of the record, not of the profile. Record types can be enabled on a per-profile basis, which changes what record types members of that profile can create (not has no effect on their ability to view and edit records). Once the record type is set on a specific record, it remains there until explicitly changed.

When you log in as Admin in your Example 2, the record you are viewing still has the record type that was created by the Manager, which does not provide the Denied value. You would need to change the record type to expose that picklist value.

Record types are not a great solution for limiting picklist value selections on a per-user basis. Validation Rules can do this well, especially combined with a Custom Permission to designate which profiles or permission sets are allowed to choose a specific picklist value.

For example, if you created a Custom Permission called "Can_Set_Denied" and added it to the Admin profile, you could write a Validation Rule something like this:

(ISNEW() || ISCHANGED(Status__c)) && ISPICKVAL(Status__c, "Denied") && !$Permission.Can_Set_Denied)

This would let you show a validation message to any user who tried to set the Denied value but did not have the custom permission.

| improve this answer | |

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.