Salesforce Fact #676 | Get readonly fields in page layout using apex
Using Metadata class methods, we can get the list of fields present in a particular page layout.
Suppose we need to find out the list of ReadOnly fields in a page layout, we can get the same using a condition check on Metadata.UiBehavior enum. It has three values: 'Edit', 'ReadOnly' & 'Required'.
Attached is the screenshot.
Comments
Post a Comment