Salesforce Fact #849 | Making field read only using dynamic forms and custom permission access

Another use case of dynamic forms. Suppose, we want to make a field read only for all users and would like to make it editable only if the user is assigned a particular custom permission.

We can make use of dynamic forms and take two instances of that field along with the filter conditions accordingly. In this example, we have made the LeadSource field on Opportunity read only for most users and editable only if the user is assigned the 'Test_Custom_Permission'.

Note: Admin users will always see the field as editable because of the system permission 'edit read only fields'. Dynamic forms are not supported for community.

Attached are the screenshots.




Comments

  1. Whether you're looking to Do my assignment or develop innovative solutions to complex problems, understanding AI and its implications is key to thriving in the future.


    ReplyDelete

Post a Comment

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow