---
id: object/codeunit/5700
type: object
title: Codeunit 5700 "User Setup Management"
summary: Codeunit 5700 "User Setup Management" in Base Application (System.Security.User). 26 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: bbd99682223bcfde98c58b18081eed1385c80670f22b2f607f90437a0c0da1ab
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/User/UserSetupManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/System/User/UserSetupManagement.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: 5700
name: User Setup Management
namespace: System.Security.User
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 42
  events: 15
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 74
  implements: 0
---

# Codeunit 5700 "User Setup Management"

> Codeunit 5700 "User Setup Management" in Base Application (System.Security.User). 26 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData Location = r, TableData "Responsibility Center" = r |

## Events published

- `OnAfterGetPurchFilter(var UserSetup: Record "User Setup"; var UserRespCenter: Code[10]; var UserLocation: Code[10])` (integration)
- `OnAfterGetSalesFilter(var UserSetup: Record "User Setup"; var UserRespCenter: Code[10]; var UserLocation: Code[10])` (integration)
- `OnAfterGetServiceFilter(var UserSetup: Record "User Setup"; var UserRespCenter: Code[10]; var UserLocation: Code[10])` (integration)
- `OnAfterGetSalesFilterProcedure(UserCode: Code[50]; Result: Code[10])` (integration)
- `OnAfterGetPurchasesFilter(UserCode: Code[50]; Result: Code[10])` (integration)
- `OnAfterGetServiceFilterProcedure(UserCode: Code[50]; Result: Code[10])` (integration)
- `OnBeforeCheckRespCenter2(DocType: Option Sales,Purchase,Service; AccRespCenter: Code[10]; UserCode: Code[50]; var IsHandled: Boolean; var Result: Boolean)` (integration)
- `OnBeforeGetLocation(DocType: Option Sales,Purchase,Service; AccLocation: Code[10]; RespCenterCode: Code[10]; var LocationCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforeGetRespCenter(DocType: Option Sales,Purchase,Service; AccRespCenter: Code[10]; var IsHandled: Boolean; var UserRespCenter: Code[10])` (integration)
- `OnBeforeGetSalesFilter(UserCode: Code[50]; var UserLocation: Code[10]; var UserRespCenter: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforeIsPostingDateValidWithSetup(PostingDate: Date; var Result: Boolean; var IsHandled: Boolean; var SetupRecordID: RecordID)` (integration)
- `OnBeforeIsDeferralPostingDateValidWithSetup(PostingDate: Date; var Result: Boolean; var IsHandled: Boolean; var SetupRecordID: RecordID)` (integration)
- `OnBeforeIsVATDateValidWithSetup(VATDate: Date; var Result: Boolean; var IsHandled: Boolean; var SetupRecordID: RecordID; var FieldNo: Integer)` (integration)
- `OnAfterGetSalesInvoicePostingPolicy(var UserSetup: Record "User Setup"; var PostQty: Boolean; var PostAmount: Boolean)` (integration)
- `OnAfterGetPurchaseInvoicePostingPolicy(var UserSetup: Record "User Setup"; var PostQty: Boolean; var PostAmount: Boolean)` (integration)

## Procedures

- `GetSalesFilter(): Code[10]`
- `GetPurchasesFilter(): Code[10]`
- `GetServiceFilter(): Code[10]`
- `GetSalesFilter(UserCode: Code[50]): Code[10]`
- `GetPurchasesFilter(UserCode: Code[50]): Code[10]`
- `GetServiceFilter(UserCode: Code[50]): Code[10]`
- `GetRespCenter(DocType: Option Sales,Purchase,Service; AccRespCenter: Code[10]): Code[10]`
- `CheckRespCenter(DocType: Option Sales,Purchase,Service; AccRespCenter: Code[10]): Boolean`
- `CheckRespCenter(DocType: Option Sales,Purchase,Service; AccRespCenter: Code[10]; UserCode: Code[50]): Boolean`
- `GetLocation(DocType: Option Sales,Purchase,Service; AccLocation: Code[10]; RespCenterCode: Code[10]): Code[10]`
- `CheckAllowedPostingDate(PostingDate: Date)`
- `TestAllowedPostingDate(PostingDate: Date; var ErrorText: Text[250]): Boolean`
- `CheckAllowedVATDatesRange(AllowVATDateFrom: Date; AllowVATDateTo: Date; NotificationType: Option Error,Notification; InvokedBy: Integer)`
- `CheckAllowedPostingDatesRange(AllowPostingFrom: Date; AllowPostingTo: Date; NotificationType: Option Error,Notification; InvokedBy: Integer)`
- `CheckAllowedPostingDatesRange(AllowPostingFrom: Date; AllowPostingTo: Date; NotificationType: Option Error,Notification; InvokedBy: Integer; AllowPostingFromCaption: Text; AllowPostingToCaption: Text)`
- `CheckAllowedVATDatesRange(AllowPostingFrom: Date; AllowPostingTo: Date; NotificationType: Option Error,Notification; InvokedBy: Integer; AllowVATFromCaption: Text; AllowVATToCaption: Text)`
- `IsVATDateInAllowedPeriod(VATDate: Date; var SetupRecordID: RecordID; var FieldNo: Integer): Boolean`
- `IsPostingDateValid(PostingDate: Date): Boolean`
- `IsPostingDateValidWithSetup(PostingDate: Date; var SetupRecordID: RecordID): Boolean`
- `IsDeferralPostingDateValidWithSetup(PostingDate: Date; var SetupRecordID: RecordID): Boolean`
- `IsPostingDateValidWithGenJnlTemplate(PostingDate: Date; TemplateName: Code[20]): Boolean`
- `IsPostingDateValidWithGenJnlTemplateWithSetup(PostingDate: Date; TemplateName: Code[20]; var SetupRecordID: RecordID): Boolean`
- `GetDateRange(var AllowFrom: Date; var AllowTo: Date; AllowFromDateFormula: DateFormula; AllowToDateFormula: DateFormula; SetupRecordID: RecordID)`
- `GetSalesInvoicePostingPolicy(var PostQty: Boolean; var PostAmount: Boolean)`
- `GetPurchaseInvoicePostingPolicy(var PostQty: Boolean; var PostAmount: Boolean)`
- `GetServiceInvoicePostingPolicy(var Ship: Boolean; var Consume: Boolean; var Invoice: Boolean)`

Plus 1 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 799 "VAT Reporting Date Mgt"](../codeunit/799.md) (1 call: `IsVATDateInAllowedPeriod → IsVATDateEnabled`)

## Called by

- [Table 5900 "Service Header"](../table/5900.md) (8 calls: `CopyCustomerFields → GetLocation`, `CopyCustomerFields → GetRespCenter`, `InitRecord → GetLocation`, …)
- [Codeunit 99 "Posting Selection Management"](../codeunit/99.md) (7 calls: `CheckUserCanInvoicePurchase → GetPurchaseInvoicePostingPolicy`, `CheckUserCanInvoiceSales → GetSalesInvoicePostingPolicy`, `ConfirmPostPurchaseDocument → GetPurchaseInvoicePostingPolicy`, …)
- [Table 36 "Sales Header"](../table/36.md) (6 calls: `CopySellToCustomerAddressFieldsFromCustomer → GetRespCenter`, `InitRecord → GetRespCenter`, `OnDelete → CheckRespCenter`, …)
- [Table 38 "Purchase Header"](../table/38.md) (5 calls: `InitRecord → GetRespCenter`, `OnDelete → CheckRespCenter`, `OnDelete → GetPurchasesFilter`, …)
- [Table 5965 "Service Contract Header"](../table/5965.md) (4 calls: `ChangeCustomerNo → GetRespCenter`, `OnDelete → CheckRespCenter`, `OnDelete → GetSalesFilter`, …)
- [Table 91 "User Setup"](../table/91.md) (4 calls: `CheckAllowedDeferralPostingDates → CheckAllowedPostingDatesRange`, `CheckAllowedPostingDates → CheckAllowedPostingDatesRange`, `CheckAllowedPostingDates → GetDateRange`, …)
- [Codeunit 5940 "ServContractManagement"](../codeunit/5940.md) (3 calls: `ChangeCustNoOnServContract → GetRespCenter`, `CreateOrGetCreditHeader → GetLocation`, `CreateServHeader → GetLocation`)
- [Table 83 "Item Journal Line"](../table/83.md) (3 calls: `SetUpNewLine → GetLocation`, `SetUpNewLine → GetPurchasesFilter`, `SetUpNewLine → GetSalesFilter`)
- [Table 98 "General Ledger Setup"](../table/98.md) (3 calls: `CheckAllowedDeferralPostingDates → CheckAllowedPostingDatesRange`, `CheckAllowedPostingDates → CheckAllowedPostingDatesRange`, `CheckDateRange → GetDateRange`)
- [Codeunit 11 "Gen. Jnl.-Check Line"](../codeunit/11.md) (2 calls: `IsDateNotAllowed → IsPostingDateValidWithSetup`, `IsDeferralPostingDateNotAllowed → IsDeferralPostingDateValidWithSetup`)
- [Codeunit 5957 "Serv. Posting Selection Mgt."](../codeunit/5957.md) (2 calls: `CheckUserCanInvoiceService → GetServiceInvoicePostingPolicy`, `ConfirmPostServiceDocument → GetServiceInvoicePostingPolicy`)
- [Codeunit 1011 "Job Jnl.-Check Line"](../codeunit/1011.md) (1 call: `CheckPostingDate → IsPostingDateValid`)
- [Codeunit 21 "Item Jnl.-Check Line"](../codeunit/21.md) (1 call: `CheckDates → CheckAllowedPostingDate`)
- [Codeunit 211 "Res. Jnl.-Check Line"](../codeunit/211.md) (1 call: `CheckPostingDate → CheckAllowedPostingDate`)
- [Codeunit 432 "Consolidate"](../codeunit/432.md) (1 call: `ClearPreviousConsolidation → CheckAllowedPostingDate`)
- [Codeunit 5995 "Service Warehouse Mgt."](../codeunit/5995.md) (1 call: `OnAfterGetInvoicePostingPolicy → GetServiceInvoicePostingPolicy`)
- [Codeunit 7251 "Bank Acc. Rec. Trans. to Acc."](../codeunit/7251.md) (1 call: `PostNewPaymentsToProposedGLAccounts → IsPostingDateValidWithGenJnlTemplate`)
- [Page 41 "Sales Quote"](../page/41.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 42 "Sales Order"](../page/42.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 43 "Sales Invoice"](../page/43.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 44 "Sales Credit Memo"](../page/44.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 49 "Purchase Quote"](../page/49.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 50 "Purchase Order"](../page/50.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 507 "Blanket Sales Order"](../page/507.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 509 "Blanket Purchase Order"](../page/509.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 51 "Purchase Invoice"](../page/51.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 52 "Purchase Credit Memo"](../page/52.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 5900 "Service Order"](../page/5900.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 5933 "Service Invoice"](../page/5933.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 5935 "Service Credit Memo"](../page/5935.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 5964 "Service Quote"](../page/5964.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 6050 "Service Contract"](../page/6050.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 6053 "Service Contract Quote"](../page/6053.md) (1 call: `OnNewRecord → GetServiceFilter`)
- [Page 6234 "Sustainability Goals"](../page/6234.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 6630 "Sales Return Order"](../page/6630.md) (1 call: `OnNewRecord → GetSalesFilter`)
- [Page 6640 "Purchase Return Order"](../page/6640.md) (1 call: `OnNewRecord → GetPurchasesFilter`)
- [Page 7252 "Trans. To GL Acc. AI Proposal"](../page/7252.md) (1 call: `VerifyAllowedPostingDates → IsPostingDateValidWithGenJnlTemplate`)
- [Report 202 "Sales Document - Test"](../report/202.md) (1 call: `VerifyPostingDate → TestAllowedPostingDate`)
- [Report 317 "Vendor Pre-Payment Journal"](../report/317.md) (1 call: `CheckNonZeroPostingDate → TestAllowedPostingDate`)
- [Report 402 "Purchase Document - Test"](../report/402.md) (1 call: `VerifyPostingDate → TestAllowedPostingDate`)
- [Report 5915 "Service Document - Test"](../report/5915.md) (1 call: `VerifyPostingDate → TestAllowedPostingDate`)
- [Table 110 "Sales Shipment Header"](../table/110.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 111 "Sales Shipment Line"](../table/111.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 112 "Sales Invoice Header"](../table/112.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 113 "Sales Invoice Line"](../table/113.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 114 "Sales Cr.Memo Header"](../table/114.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 115 "Sales Cr.Memo Line"](../table/115.md) (1 call: `SetSecurityFilterOnRespCenter → GetSalesFilter`)
- [Table 120 "Purch. Rcpt. Header"](../table/120.md) (1 call: `SetSecurityFilterOnRespCenter → GetPurchasesFilter`)
- [Table 121 "Purch. Rcpt. Line"](../table/121.md) (1 call: `SetSecurityFilterOnRespCenter → GetPurchasesFilter`)
- [Table 122 "Purch. Inv. Header"](../table/122.md) (1 call: `SetSecurityFilterOnRespCenter → GetPurchasesFilter`)
- and 24 more: data/code/graph/29/calls.json

## Across versions

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

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: "User Setup Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
