---
id: object/codeunit/960
type: object
title: Codeunit 960 "Posting Group Change"
summary: Codeunit 960 "Posting Group Change" in Base Application (Microsoft.Finance.ReceivablesPayables). 10 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC25, BC27-28.
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: a69b3c9f911b9db4cf65cf2f1398fb6ae17ef8dee56518daba3515f135d16baf
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/ReceivablesPayables/PostingGroupChange.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/ReceivablesPayables/PostingGroupChange.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: 960
name: Posting Group Change
namespace: Microsoft.Finance.ReceivablesPayables
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 0
  called_by: 0
  implements: 1
---

# Codeunit 960 "Posting Group Change"

> Codeunit 960 "Posting Group Change" in Base Application (Microsoft.Finance.ReceivablesPayables). 10 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC25, BC27-28.

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

## Events published

- `OnAfterChangePostingGroup(SourceRecordRef: RecordRef; NewPostingGroup: Code[20]; OldPostingGroup: Code[20])` (integration): Integration event raised after changing posting group to allow custom processing.
  - subscribers: [Codeunit 5959 "Serv. Posting Group Change"](../codeunit/5959.md) OnAfterChangePostingGroup

## Procedures

- `ChangePostingGroup(NewPostingGroup: Code[20]; OldPostingGroup: Code[20]; SourceRecordVar: Variant)`: Changes posting group with validation based on document type and substitute posting group setup.
- `CheckCustomerPostingGroupSubstSetup(NewPostingGroup: Code[20]; OldPostingGroup: Code[20])`
- `CheckVendorPostingGroupSubstSetup(NewPostingGroup: Code[20]; OldPostingGroup: Code[20])`: Checks vendor posting group substitute setup before allowing posting group change.
- `CheckEmployeePostingGroupSubstSetup(NewPostingGroup: Code[20]; OldPostingGroup: Code[20])`: Checks employee posting group substitute setup before allowing posting group change.
- `CheckAllowChangeSalesSetup()`: Checks if sales and receivables setup allows multiple posting groups before changing customer posting groups.
- `CheckAllowChangePurchaseSetup()`: Checks if purchases and payables setup allows multiple posting groups before changing vendor posting groups.
- `CheckAllowChangeHRSetup()`: Checks if human resources setup allows multiple posting groups before changing employee posting groups.
- `HasCustomerSamePostingGroup(NewPostingGroup: Code[20]; CustomerNo: Code[20]): Boolean`: Checks if a customer already has the same posting group to avoid unnecessary validation.
- `HasVendorSamePostingGroup(NewPostingGroup: Code[20]; VendorNo: Code[20]): Boolean`: Checks if a vendor already has the same posting group to avoid unnecessary validation.
- `HasEmployeeSamePostingGroup(NewPostingGroup: Code[20]; EmployeeNo: Code[20]): Boolean`: Checks if an employee already has the same posting group to avoid unnecessary validation.

Plus 9 local procedures.

## Implements

- [Enum 960 "Posting Group Change Method"](../enum/960.md)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC27-28

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: "Posting Group Change")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
