Posts

Showing posts with the label dynamic form

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

Image
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.

Salesforce Fact #543 | Required field in dynamic forms

While migrating fields from layout to dynamic form, if any universally required field was not present in the layout it is migrated from, it is not migrated automatically. For example, in Opportunity page layout the universally required field Forecast Category is not present and while migrating the fields to dynamic form, we get an error message saying a required field is missing in the layout and the user won't be able to save any record. Reference:  https://trailhead.salesforce.com/content/learn/projects/convert-a-lightning-page-to-dynamic-forms/get-started-with-dynamic-forms