---
id: object/codeunit/1550
type: object
title: Codeunit 1550 "Record Restriction Mgt."
summary: Codeunit 1550 "Record Restriction Mgt." in Base Application (System.Automation). 8 public procedures, 22 events, 51 event subscribers. Present since at least BC23, still in BC30, changed in BC26, BC28-30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  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: 2c18c952db6c8e4c758ab1e325ddc66fc2747732b59821152d201b802428397e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Workflow/RecordRestrictionMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/System/Workflow/RecordRestrictionMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11609
object_type: codeunit
object_id: 1550
name: Record Restriction Mgt.
namespace: System.Automation
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
  - "28"
  - "29"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 88
  events: 22
  subscribers: 51
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 6
  implements: 0
---

# Codeunit 1550 "Record Restriction Mgt."

> Codeunit 1550 "Record Restriction Mgt." in Base Application (System.Automation). 8 public procedures, 22 events, 51 event subscribers. Present since at least BC23, still in BC30, changed in BC26, BC28-30.

Base Application · System.Automation · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/Workflow/RecordRestrictionMgt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Restricted Record" = rimd |

## Events published

- `OnAfterSetRestrictedRecordFiltersForRecRef(var RestrictedRecord: Record "Restricted Record"; RecordRef: RecordRef)` (integration)
- `OnBeforeCustomerCheckSalesPostRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeVendorCheckPurchasePostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCustomerCheckGenJournalLinePostRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeVendorCheckGenJournalLinePostRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeItemJournalLineCheckItemPostRestrictions(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeGenJournalLineCheckGenJournalLinePostRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeGenJournalLineCheckGenJournalLinePrintCheckRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeGenJournalBatchCheckGenJournalLinePostRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeGenJournalBatchCheckGenJournalLineExportRestrictions(var GenJournalBatch: Record "Gen. Journal Batch"; var IsHandled: Boolean)` (integration)
- `OnBeforeGenJournalLineCheckLineExportRestrictions(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeSalesHeaderCheckSalesPostRestrictions(var Sender: Record "Sales Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeSalesHeaderCheckSalesReleaseRestrictions(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration)
- `OnBeforePurchaseHeaderCheckPurchasePostRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforePurchaseHeaderCheckPurchaseReleaseRestrictions(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeIncomingDocCheckSetForOCRRestrictions(var IncomingDocument: Record "Incoming Document"; var IsHandled: Boolean)` (integration)
- `OnBeforeIncomingDocCheckReleaseRestrictions(var Sender: Record "Incoming Document"; var IsHandled: Boolean)` (integration)
- `OnBeforeIncomingDocCheckCreateDocRestrictions(var IncomingDocument: Record "Incoming Document"; var IsHandled: Boolean)` (integration)
- `OnRestrictRecordUsageOnBeforeSetFilter(var RestrictedRecord: Record "Restricted Record"; RecordReference: RecordRef)` (integration)
- `OnAllowRecordUsageOnBeforeSetFilter(var RestrictedRecord: Record "Restricted Record"; RecordReference: RecordRef)` (integration)
- `OnUpdateRestrictionOnBeforeSetFilter(var RestrictedRecord: Record "Restricted Record"; RecordReference: RecordRef; xRecordReference: RecordRef)` (integration)
- `OnCheckRecordHasUsageRestrictionsOnBeforeSetFilter(var RestrictedRecord: Record "Restricted Record"; RecordReference: RecordRef)` (integration)

## Event subscriptions

- RestrictGenJournalLineAfterInsert subscribes to Table "Gen. Journal Line" OnAfterInsertEvent
- RestrictGenJournalLineAfterModify subscribes to Table "Gen. Journal Line" OnAfterModifyEvent
- RestrictItemJournalLineAfterInsert subscribes to Table "Item Journal Line" OnAfterInsertEvent
- RestrictItemJournalLineAfterModify subscribes to Table "Item Journal Line" OnAfterModifyEvent
- RestrictRequisitionLineAfterInsert subscribes to Table "Requisition Line" OnAfterInsertEvent
- RestrictRequisitionLineAfterModify subscribes to Table "Requisition Line" OnAfterModifyEvent
- RestrictVendorBankAccountAfterInsert subscribes to Table "Vendor Bank Account" OnAfterInsertEvent
- RestrictVendorBankAccountAfterModify subscribes to Table "Vendor Bank Account" OnAfterModifyEvent
- CustomerCheckSalesPostRestrictions subscribes to Table "Sales Header" OnCheckSalesPostRestrictions
- VendorCheckPurchasePostRestrictions subscribes to Table "Purchase Header" OnCheckPurchasePostRestrictions
- CustomerCheckGenJournalLinePostRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLinePostRestrictions
- VendorCheckGenJournalLinePostRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLinePostRestrictions
- ItemJournalLineCheckItemPostRestrictions subscribes to Table "Item Journal Line" OnCheckItemJournalLinePostRestrictions
- GenJournalLineCheckGenJournalLinePostRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLinePostRestrictions
- GenJournalLineCheckGenJournalLinePrintCheckRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLinePrintCheckRestrictions
- RequisitionWkshBatchCheckRequisitionWkshLinePostRestrictions subscribes to Table "Requisition Line" OnCheckRequisitionWkshLinePostRestrictions
- RequisitionWkshLineCheckRequisitionWkshLinePostRestrictions subscribes to Table "Requisition Line" OnCheckRequisitionWkshLinePostRestrictions
- CheckPrintRestrictionsBeforeInsertCheckLedgerEntry subscribes to Table "Check Ledger Entry" OnBeforeInsertEvent
- CheckPrintRestrictionsBeforeModifyCheckLedgerEntry subscribes to Table "Check Ledger Entry" OnBeforeModifyEvent
- GenJournalBatchCheckGenJournalLinePostRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLinePostRestrictions
- GenJournalBatchCheckGenJournalLineExportRestrictions subscribes to Table "Gen. Journal Batch" OnCheckGenJournalLineExportRestrictions
- GenJournalLineCheckLineExportRestrictions subscribes to Table "Gen. Journal Line" OnCheckGenJournalLineExportRestrictions
- ItemJournalBatchCheckItemJournalLinePostRestrictions subscribes to Table "Item Journal Line" OnCheckItemJournalLinePostRestrictions
- SalesHeaderCheckSalesPostRestrictions subscribes to Table "Sales Header" OnCheckSalesPostRestrictions
- SalesHeaderCheckSalesReleaseRestrictions subscribes to Table "Sales Header" OnCheckSalesReleaseRestrictions
- PurchaseHeaderCheckPurchasePostRestrictions subscribes to Table "Purchase Header" OnCheckPurchasePostRestrictions
- PurchaseHeaderCheckPurchaseReleaseRestrictions subscribes to Table "Purchase Header" OnCheckPurchaseReleaseRestrictions
- RemoveCustomerRestrictionsBeforeDelete subscribes to Table "Customer" OnBeforeDeleteEvent
- RemoveVendorRestrictionsBeforeDelete subscribes to Table "Vendor" OnBeforeDeleteEvent
- RemoveVendorBankAccountRestrictionsBeforeDelete subscribes to Table "Vendor Bank Account" OnBeforeDeleteEvent
- RemoveItemRestrictionsBeforeDelete subscribes to Table "Item" OnBeforeDeleteEvent
- RemoveGenJournalLineRestrictionsBeforeDelete subscribes to Table "Gen. Journal Line" OnBeforeDeleteEvent
- RemoveGenJournalBatchRestrictionsBeforeDelete subscribes to Table "Gen. Journal Batch" OnBeforeDeleteEvent
- RemoveItemJournalBatchRestrictionsBeforeDelete subscribes to Table "Item Journal Batch" OnBeforeDeleteEvent
- RemoveRequisitionWkshBatchRestrictionsBeforeDelete subscribes to Table "Requisition Wksh. Name" OnBeforeDeleteEvent
- RemoveSalesHeaderRestrictionsBeforeDelete subscribes to Table "Sales Header" OnBeforeDeleteEvent
- RemovePurchaseHeaderRestrictionsBeforeDelete subscribes to Table "Purchase Header" OnBeforeDeleteEvent
- UpdateGenJournalLineRestrictionsAfterRename subscribes to Table "Gen. Journal Line" OnAfterRenameEvent
- UpdateItemJournalLineRestrictionsAfterRename subscribes to Table "Item Journal Line" OnAfterRenameEvent
- UpdateRequisitionWkshLineRestrictionsAfterRename subscribes to Table "Requisition Line" OnAfterRenameEvent
- UpdateVendorBankAccountRestrictionsAfterRename subscribes to Table "Vendor Bank Account" OnAfterRenameEvent
- IncomingDocCheckSetForOCRRestrictions subscribes to Table "Incoming Document" OnCheckIncomingDocSetForOCRRestrictions
- IncomingDocCheckReleaseRestrictions subscribes to Table "Incoming Document" OnCheckIncomingDocReleaseRestrictions
- UpdateGenJournalBatchRestrictionsAfterRename subscribes to Table "Gen. Journal Batch" OnAfterRenameEvent
- UpdateItemJournalBatchRestrictionsAfterRename subscribes to Table "Item Journal Batch" OnAfterRenameEvent
- UpdateRequisitionWkshBatchRestrictionsAfterRename subscribes to Table "Requisition Wksh. Name" OnAfterRenameEvent
- UpdateSalesHeaderRestrictionsAfterRename subscribes to Table "Sales Header" OnAfterRenameEvent
- UpdatePurchaseHeaderRestrictionsAfterRename subscribes to Table "Purchase Header" OnAfterRenameEvent
- IncomingDocCheckCreateDocRestrictions subscribes to Table "Incoming Document" OnCheckIncomingDocCreateDocRestrictions
- CheckRecordRestrictionOnBeforeModifyJobQueueEntry subscribes to Table "Job Queue Entry" OnBeforeModifyEvent
- CheckRecordRestrictionOnBeforeDeleteJobQueueEntry subscribes to Table "Job Queue Entry" OnBeforeDeleteEvent

## Procedures

- `RestrictRecordUsage(RecVar: Variant; RestrictionDetails: Text)`
- `AllowGenJournalBatchUsage(GenJournalBatch: Record "Gen. Journal Batch")`
- `AllowItemJournalBatchUsage(ItemJournalBatch: Record "Item Journal Batch")`
- `AllowFAJournalBatchUsage(FAJournalBatch: Record "FA Journal Batch")`
- `AllowRequisitionWkshUsage(RequisitionWkshName: Record "Requisition Wksh. Name")`
- `AllowRecordUsage(RecVar: Variant)`
- `UpdateRestriction(RecVar: Variant; xRecVar: Variant)`
- `CheckRecordHasUsageRestrictions(RecVar: Variant)`

Plus 7 local procedures.

## Triggers

OnRun

## 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 1535 "Approvals Mgmt."](../codeunit/1535.md) (5 calls: `RestrictBankAccount → IsVendorBankApprovalsWorkflowEnabled`, `RestrictGenJournalLine → IsGeneralJournalBatchApprovalsWorkflowEnabled`, `RestrictGenJournalLine → IsGeneralJournalLineApprovalsWorkflowEnabled`, …)

## Called by

- [Codeunit 1521 "Workflow Response Handling"](../codeunit/1521.md) (7 calls: `AllowRecordUsage → AllowFAJournalBatchUsage`, `AllowRecordUsage → AllowGenJournalBatchUsage`, `AllowRecordUsage → AllowItemJournalBatchUsage`, …)
- [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) (6 calls: `AllowSustJournalBatchUsage → AllowRecordUsage`, `CheckRecordHasUsageRestrictions → CheckRecordHasUsageRestrictions`, `RemoveSustJournalBatchRestrictionsBeforeDelete → AllowRecordUsage`, …)
- [Codeunit 1535 "Approvals Mgmt."](../codeunit/1535.md) (3 calls: `PostApprovalEntriesMoveGenJournalBatch → AllowRecordUsage`, `PostApprovalEntriesMoveItemJournalBatch → AllowRecordUsage`, `PostApprovalEntriesMoveRequisitionWkshBatch → AllowRecordUsage`)
- [Table 1504 "Workflow Step Instance"](../table/1504.md) (1 call: `RemoveRecordRestrictions → AllowRecordUsage`)
- [Table 81 "Gen. Journal Line"](../table/81.md) (1 call: `RestrictGenJournalLine → RestrictRecordUsage`)
- [Table 83 "Item Journal Line"](../table/83.md) (1 call: `RestrictItemJournalBatch → RestrictRecordUsage`)

## Recent changes

- 2026-10-01 [#11609 [Main]-Reduce redundant record restriction checks in item journal line](../../changes/bcapps/11609.md) (main, BC30, performance)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26, BC28-30

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: "Record Restriction Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
