---
id: object/codeunit/9856
type: object
title: Codeunit 9856 "Permission Set Relation Impl."
summary: Codeunit 9856 "Permission Set Relation Impl." in System Application (System.Security.AccessControl). 18 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 60fe2396cfb3fd44326d241b8b9cb37e3c9a10734769a9593f52ae82de2ac926
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Permission%20Sets/src/PermissionSetRelationImpl.Codeunit.al
    title: src/System Application/App/Permission Sets/src/PermissionSetRelationImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 9856
name: Permission Set Relation Impl.
namespace: System.Security.AccessControl
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 26
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 7
  implements: 0
---

# Codeunit 9856 "Permission Set Relation Impl."

> Codeunit 9856 "Permission Set Relation Impl." in System Application (System.Security.AccessControl). 18 public procedures. Present since at least BC23, still in BC30.

System Application · System.Security.AccessControl · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Permission%20Sets/src/PermissionSetRelationImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Procedures

- `AddPermissionSetRelationBufferList(var PermissionSetRelationBuffer: Record "Permission Set Relation Buffer" temporary)`
- `AddPermissionSetRelationBufferTree(var PermissionSetRelationBuffer: Record "Permission Set Relation Buffer" temporary)`
- `OpenPermissionSetPage(Name: Text; RoleId: Code[30]; AppId: Guid; Scope: Option System,Tenant)`
- `VerifyUserCanEditPermissionSet(AppID: Guid)`
- `SelectPermissionSets(CurrAppId: Guid; CurrRoleID: Code[30]; CurrScope: Option System,Tenant): Boolean`
- `AddNewPermissionSetRelation(CurrAppId: Guid; CurrRoleID: Code[30]; CurrScope: Option System,Tenant; RelatedAppId: Guid; RelatedRoleId: Code[30]; RelatedScope: Option System,Tenant; PermissionType: Option Include,Exclude): Boolean`
- `ModifyPermissionSet(CurrAppId: Guid; CurrRoleID: Code[30]; CurrScope: Option System,Tenant; RelatedAppId: Guid; RelatedRoleId: Code[30]; PermissionType: Option Include,Exclude): Boolean`
- `ModifyPermissionSetType(CurrAppId: Guid; CurrRoleID: Code[30]; CurrScope: Option System,Tenant; RelatedAppId: Guid; RelatedRoleID: Code[30]; PermissionType: Option Include,Exclude): Boolean`
- `ExcludePermissionSet(CurrAppId: Guid; CurrRoleID: Code[30]; CurrScope: Option System,Tenant; RelatedAppId: Guid; RelatedRoleID: Code[30]; RelatedScope: Option System,Tenant; PermissionType: Option Include,Exclude): Boolean`
- `RemovePermissionSet(CurrAppId: Guid; CurrRoleID: Code[30]; RelatedAppId: Guid; RelatedRoleID: Code[30])`
- `RefreshPermissionSets(RoleId: Code[30]; AppId: Guid; Scope: Option)`
- `RefreshPermissionSetList(RoleId: Code[30]; AppId: Guid; Scope: Option Tenant,System; var PermissionSetRelationBuffer: Record "Permission Set Relation Buffer" temporary)`
- `RefreshPermissionSetTree(RoleId: Code[30]; AppId: Guid; Scope: Option; var PermissionSetRelationBuffer: Record "Permission Set Relation Buffer" temporary)`
- `SetStyleExpr(var PermissionSetRelationBuffer: Record "Permission Set Relation Buffer" temporary; var StyleExprRoleID: Text; var StyleExprInclusionStatus: Text)`
- `UpdateIncludedPermissionSets(PermissionSetRoleId: Text; var PermissionSetBuffer: Record "PermissionSet Buffer" temporary)`
- `GetPermissionSets(var PermissionSetBuffer: Record "PermissionSet Buffer")`
- `LookupAllPermissionSets(AllowMultiselect: Boolean; var PermissionSetBuffer: Record "PermissionSet Buffer"): Boolean`
- `LookupAssignablePermissionSets(AllowMultiselect: Boolean; var AggregatePermissionSet: Record "Aggregate Permission Set"): Boolean`

Plus 8 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 8703 "Feature Telemetry"](../codeunit/8703.md) (2 calls: `AddNewPermissionSet → LogUptake`, `AddNewPermissionSet → LogUsage`)
- [Codeunit 152 "User Permissions"](../codeunit/152.md) (1 call: `VerifyUserCanEditPermissionSet → CanManageUsersOnTenant`)
- [Page 9855 "Permission Set"](../page/9855.md) (1 call: `OpenPermissionSetPage → (object)`)

## Called by

- [Codeunit 9855 "Permission Set Relation"](../codeunit/9855.md) (4 calls: `AddNewPermissionSetRelation → AddNewPermissionSetRelation`, `LookupPermissionSet → LookupAssignablePermissionSets`, `OpenPermissionSetPage → OpenPermissionSetPage`, …)
- [Page 9855 "Permission Set"](../page/9855.md) (2 calls: `UpdatePageParts → AddPermissionSetRelationBufferList`, `UpdatePageParts → AddPermissionSetRelationBufferTree`)
- [Page 9857 "Permission Set Tree"](../page/9857.md) (2 calls: `OnAfterGetRecord → SetStyleExpr`, `RefreshTreeView → RefreshPermissionSets`)
- [Page 9864 "Permission Set Subform"](../page/9864.md) (2 calls: `OnDeleteRecord → RemovePermissionSet`, `RefreshTreeView → RefreshPermissionSets`)
- [Page 9849 "Included PermissionSet FactBox"](../page/9849.md) (1 call: `UpdateIncludedPermissionSets → UpdateIncludedPermissionSets`)
- [Page 9859 "Tenant Permission Subform"](../page/9859.md) (1 call: `RefreshTreeView → RefreshPermissionSets`)
- [Page 9878 "Permission Set Lookup List"](../page/9878.md) (1 call: `OnOpenPage → GetPermissionSets`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Permission Set Relation Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
