DocGenPermsAndAccessChecksService Class
DocumentGenerationProcess Class
DocumentTemplate Class
Previous Versions
The DocGenPermsAndAccessChecksService class contains methods to check permissions and settings related to document generation and integration features.
1industries_docgen.DocGenPermsAndAccessChecksService.isDesigner(UserInfo.getOrganizationId(), userInfo.getUserId(), 'DocGenDesigner');
2industries_docgen.DocGenPermsAndAccessChecksService.isRuntimeUser(UserInfo.getOrganizationId(), userInfo.getUserId(), 'DocGenRuntimeUser');
3industries_docgen.DocGenPermsAndAccessChecksService.isRuntimeCCUser(UserInfo.getOrganizationId(), userInfo.getUserId(),'DocGenRuntimeCCUser');This Apex code sample checks whether a user has specific docgen permissions.
The following are methods for DocGenPermsAndAccessChecksService.
hasDocGenMetadataSetting(orgId, orgPreference)
Checks whether the DocGen metadata setting is enabled for the org (true) or not (false).
hasDocGenOrgPerm(orgId, orgPermission)
Checks whether the org has the DocGen permission (true) or not (false).
hasMS365IntegrationSettingOrgPerm(orgId, orgPermission)
Checks whether the org has a Microsoft 365 integration setting permission enabled (true) or not (false).
hasOmnistudioOrgPerm(orgId, orgPermission)
Checks whether the org has Omnistudio permission enabled (true) or not (false).
isDesigner(orgId, userId, userPerm)
Checks whether the user has designer permissions enabled (true) or not (false).
isRuntimeCCUser(orgId, userId, userPerm)
Checks whether the user has runtime customer community user permissions (true) or not (false).
isRuntimeUser(orgId, userId, userPerm)
Checks whether the user has runtime user permissions (true) or not (false).
Checks whether the DocGen metadata setting is enabled for the org (true) or not (false).
public static Boolean hasDocGenMetadataSetting(String orgId, String orgPreference)
Type: Boolean
Checks whether the org has the DocGen permission (true) or not (false).
public static Boolean hasDocGenOrgPerm(String orgId, String orgPermission)
Type: Boolean
Checks whether the org has a Microsoft 365 integration setting permission enabled (true) or not (false).
public static Boolean hasMS365InetgrationSettingOrgPerm(String orgId, String orgPermission)
Type: Boolean
Checks whether the org has Omnistudio permission enabled (true) or not (false).
public static Boolean hasOmnistudioOrgPerm(String orgId, String orgPermission)
Type: Boolean
Checks whether the user has designer permissions enabled (true) or not (false).
public static Boolean isDesigner(String orgId, String userId, String userPerm)
Type: Boolean
Checks whether the user has runtime customer community user permissions (true) or not (false).
public static Boolean isRuntimeCCUser(String orgId, String userId, String userPerm)
Type: Boolean
Checks whether the user has runtime user permissions (true) or not (false).
public static Boolean isRuntimeUser(String orgId, String userId, String userPerm)
Type: Boolean