Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
getFieldIsReadOnlyMap(entityName, fieldNames)
Signature
public Map<String, Boolean> getFieldIsReadOnlyMap(String entityName, Set<String> fieldNames)
Parameters
- entityName
- Type: String
- Name of the entity to retrieve field information for.
- fieldNames
- Type: String
- List of field names to determine if they are read-only.
Usage
Create a set of field names to identify the Field Level Security (FLS) for, and pass this set as an argument to the method, along with the name of the entity to which the fields belong.
1Set<String> applicantFieldsForFLS = new Set<String> {'birthdate', 'email', 'phone', 'firstname', 'lastname'};
2Map<String, Boolean> flsInfo = DigitalLendingUtils.getFieldIsReadOnlyMap('Applicant', applicantFieldsForFLS);