FeatureManagement:
For this requirement we can use FeatureManagement.checkPermission method to identify Current/Running User has a Custom Permission. This method available from Winter 18 onwards.
checkPermission(apiName)
Checks whether a custom permission is enabled.
Signature
public static Boolean checkPermission(String apiName)
Parameters
apiName
Type: String
Example:
Reference:
FeatureManagement
For this requirement we can use FeatureManagement.checkPermission method to identify Current/Running User has a Custom Permission. This method available from Winter 18 onwards.
checkPermission(apiName)
Checks whether a custom permission is enabled.
Signature
public static Boolean checkPermission(String apiName)
Parameters
apiName
Type: String
Example:
- if(FeatureManagement.checkPermission('Chat_CustomPermission_Access')){
- // Perform some logics.
- }
Reference:
FeatureManagement
No comments:
Post a Comment