Newer Version Available
getFieldIsReadOnlyMap(entityName, fieldNames)
Accepts an entity's name and a list of its fields as input, and returns a value
indicating whether the fields are read-only.
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);