DocGenPermsAndAccessChecksService Class

The DocGenPermsAndAccessChecksService class contains methods to check permissions and settings related to document generation and integration features.

industries_docgen

This Apex code sample checks whether a user has specific docgen permissions.

The following are methods for DocGenPermsAndAccessChecksService.

Checks whether the DocGen metadata setting is enabled for the org (true) or not (false).

public static Boolean hasDocGenMetadataSetting(String orgId, String orgPreference)

  • orgId: Type: String ID of the org.
  • orgPreference: Type: String Name of the DocGen metadata setting.

Type: Boolean

Checks whether the org has the DocGen permission (true) or not (false).

public static Boolean hasDocGenOrgPerm(String orgId, String orgPermission)

  • orgId: Type: String ID of the org.
  • orgPermission: Type: String Name of the permission.

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)

  • orgId: Type: String ID of the org.
  • orgPermission: Type: String Name of the permission.

Type: Boolean

Checks whether the org has Omnistudio permission enabled (true) or not (false).

public static Boolean hasOmnistudioOrgPerm(String orgId, String orgPermission)

  • orgId: Type: String ID of the org.
  • orgPermission: Type: String Name of the Omnistudio permission.

Type: Boolean

Checks whether the user has designer permissions enabled (true) or not (false).

public static Boolean isDesigner(String orgId, String userId, String userPerm)

  • orgId: Type: String ID of the org.
  • userId: Type: String ID of the user.
  • userPerm: Type: String Name of the user permission to check for designer status.

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)

  • orgId: Type: String ID of the org.
  • userId: Type: String ID of the user.
  • userPerm: Type: String Name of the user permission to check for runtime customer community user status.

Type: Boolean

Checks whether the user has runtime user permissions (true) or not (false).

public static Boolean isRuntimeUser(String orgId, String userId, String userPerm)

  • orgId: Type: String ID of the org.
  • userId: Type: String ID of the user.
  • userPerm: Type: String Name of the user permission to check for runtime user status.

Type: Boolean