---
title: "Codeunit 5511 Graph Mgt - Purch. Cr. Memo, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/points/
object: https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 5511 Graph Mgt - Purch. Cr. Memo, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/points/

50 procedures and triggers with a step in src/Layers/W1/BaseApp/Integration/Graph/GraphMgtPurchCrMemo.Codeunit.al, in source order, read from the text, not from a run.

## OnAfterInsertPurchaseHeader

[Line 40](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L40), local.

- [42](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L42) calls `CheckValidRecord`
- [42](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L42) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [45](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L45) calls `CheckUpdatesDisabled`
- [48](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L48) calls `InsertOrModifyFromPurchaseHeader`

## OnAfterModifyPurchaseHeader

[Line 52](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L52), local.

- [54](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L54) calls `CheckValidRecord`
- [54](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L54) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [57](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L57) calls `CheckUpdatesDisabled`
- [60](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L60) calls `IsBackgroundPosting`
- [63](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L63) calls `InsertOrModifyFromPurchaseHeader`

## OnAfterDeletePurchaseHeader

[Line 67](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L67), local.

- [71](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L71) calls `CheckValidRecord`
- [71](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L71) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [74](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L74) calls `CheckUpdatesDisabled`
- [77](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L77) calls `TransferRecordIDs`
- [82](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L82) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete

## OnAfterResetRecalculateCreditMemoDisc

[Line 86](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L86), local.

- [88](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L88) calls `CheckValidRecord`
- [88](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L88) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [91](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L91) calls `CheckUpdatesDisabled`
- [94](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L94) calls `InsertOrModifyFromPurchaseHeader`

## OnAfterInsertPurchaseLine

[Line 98](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L98), local.

- [100](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L100) calls `CheckValidLineRecord`
- [103](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L103) calls `CheckUpdatesDisabled`
- [106](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L106) calls `ModifyTotalsPurchaseLine`

## OnAfterModifyPurchaseLine

[Line 110](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L110), local.

- [112](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L112) calls `CheckValidLineRecord`
- [115](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L115) calls `CheckUpdatesDisabled`
- [118](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L118) calls `ModifyTotalsPurchaseLine`

## OnAfterDeletePurchaseLine

[Line 122](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L122), local.

- [126](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L126) calls `CheckValidLineRecord`
- [129](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L129) calls `CheckUpdatesDisabled`
- [137](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L137) calls `ModifyTotalsPurchaseLine`
- [144](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L144) calls `BlankTotals`

## OnAfterInsertPurchaseCreditMemoHeader

[Line 148](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L148), local.

- [150](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L150) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [153](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L153) calls `CheckUpdatesDisabled`
- [156](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L156) calls `InsertOrModifyFromPurchaseCreditMemoHeader`

## OnAfterModifyPurchaseCreditMemoHeader

[Line 160](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L160), local.

- [162](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L162) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [165](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L165) calls `CheckUpdatesDisabled`
- [168](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L168) calls `InsertOrModifyFromPurchaseCreditMemoHeader`

## OnAfterRenamePurchaseCreditMemoHeader

[Line 172](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L172), local.

- [176](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L176) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [179](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L179) calls `CheckUpdatesDisabled`
- [185](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L185) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `SetIsRenameAllowed`
- [186](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L186) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Rename

## OnAfterDeletePurchaseCreditMemoHeader

[Line 190](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L190), local.

- [194](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L194) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [197](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L197) calls `CheckUpdatesDisabled`
- [203](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L203) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete

## OnAfterCalculatePurchaseDiscountOnPurchaseHeader

[Line 207](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L207), local.

- [209](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L209) calls `CheckValidRecord`
- [209](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L209) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [212](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L212) calls `CheckUpdatesDisabled`
- [215](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L215) calls `InsertOrModifyFromPurchaseHeader`

## OnAfterInsertVendorLedgerEntry

[Line 219](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L219), local.

- [221](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L221) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [224](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L224) calls `CheckUpdatesDisabled`
- [227](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L227) calls `SetStatusOptionFromVendorLedgerEntry`

## OnAfterModifyVendorLedgerEntry

[Line 231](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L231), local.

- [233](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L233) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [236](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L236) calls `CheckUpdatesDisabled`
- [239](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L239) calls `SetStatusOptionFromVendorLedgerEntry`

## OnAfterRenameVendorLedgerEntry

[Line 243](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L243), local.

- [245](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L245) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [248](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L248) calls `CheckUpdatesDisabled`
- [251](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L251) calls `SetStatusOptionFromVendorLedgerEntry`

## OnAfterDeleteVendorLedgerEntry

[Line 255](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L255), local.

- [257](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L257) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [260](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L260) calls `CheckUpdatesDisabled`
- [263](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L263) calls `SetStatusOptionFromVendorLedgerEntry`

## OnAfterInsertCancelledDocument

[Line 267](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L267), local.

- [269](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L269) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [272](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L272) calls `CheckUpdatesDisabled`
- [275](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L275) calls `SetStatusOptionFromCancelledDocument`

## OnAfterModifyCancelledDocument

[Line 279](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L279), local.

- [281](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L281) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [284](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L284) calls `CheckUpdatesDisabled`
- [287](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L287) calls `SetStatusOptionFromCancelledDocument`

## OnAfterRenameCancelledDocument

[Line 291](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L291), local.

- [293](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L293) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [296](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L296) calls `CheckUpdatesDisabled`
- [299](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L299) calls `SetStatusOptionFromCancelledDocument`
- [300](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L300) calls `SetStatusOptionFromCancelledDocument`

## OnAfterDeleteCancelledDocument

[Line 304](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L304), local.

- [306](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L306) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [309](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L309) calls `CheckUpdatesDisabled`
- [312](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L312) calls `SetStatusOptionFromCancelledDocument`

## OnBeforePurchCrMemoHeaderInsert

[Line 316](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L316), local.

- [322](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L322) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [325](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L325) calls `CheckUpdatesDisabled`
- [346](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L346) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete
- [349](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L349) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `GetIsRenameAllowed`
- [350](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L350) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `SetIsRenameAllowed`
- [351](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L351) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Rename
- [352](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L352) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `SetIsRenameAllowed`

## PropagateOnInsert

[Line 356](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L356).

- [364](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L364) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [377](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L377) calls [Codeunit 10 Type Helper](https://jonas-paprotka.de/ref/codeunit/10-type-helper/) `TransferFieldsWithValidate`

## PropagateOnModify

[Line 385](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L385).

- [392](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L392) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [404](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L404) calls [Codeunit 10 Type Helper](https://jonas-paprotka.de/ref/codeunit/10-type-helper/) `TransferFieldsWithValidate`

## PropagateOnDelete

[Line 412](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L412).

- [417](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L417) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [424](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L424) writes [Table 124 Purch. Cr. Memo Hdr.](https://jonas-paprotka.de/ref/table/124-purch-cr-memo-hdr/) Delete(true)
- [427](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L427) writes [Table 38 Purchase Header](https://jonas-paprotka.de/ref/table/38-purchase-header/) Delete(true)

## UpdateBufferTableRecords

[Line 431](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L431).

- [442](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L442) calls `InsertOrModifyFromPurchaseHeader`
- [443](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L443) calls [Codeunit 9994 API Data Upgrade](https://jonas-paprotka.de/ref/codeunit/9994-api-data-upgrade/) `CountRecordsAndCommit`
- [448](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L448) calls `InsertOrModifyFromPurchaseCreditMemoHeader`
- [449](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L449) calls [Codeunit 9994 API Data Upgrade](https://jonas-paprotka.de/ref/codeunit/9994-api-data-upgrade/) `CountRecordsAndCommit`
- [456](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L456) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete(true)
- [457](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L457) calls [Codeunit 9994 API Data Upgrade](https://jonas-paprotka.de/ref/codeunit/9994-api-data-upgrade/) `CountRecordsAndCommit`
- [465](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L465) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete(true)
- [466](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L466) calls [Codeunit 9994 API Data Upgrade](https://jonas-paprotka.de/ref/codeunit/9994-api-data-upgrade/) `CountRecordsAndCommit`

## InsertOrModifyFromPurchaseHeader

[Line 471](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L471), local.

- [482](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L482) calls `SetStatusOptionFromPurchaseHeader`
- [483](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L483) calls `AssignTotalsFromPurchaseHeader`
- [484](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L484) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `UpdateReferencedRecordIds`
- [487](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L487) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Modify(true)
- [489](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L489) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Insert(true)

## InsertOrModifyFromPurchaseCreditMemoHeader

[Line 511](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L511), local.

- [519](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L519) calls `GetPurchaseCrMemoHeaderId`
- [522](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L522) calls `SetStatusOptionFromPurchaseCreditMemoHeader`
- [523](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L523) calls `AssignTotalsFromPurchaseCreditMemoHeader`
- [524](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L524) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `UpdateReferencedRecordIds`
- [527](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L527) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Modify(true)
- [529](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L529) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Insert(true)

## SetStatusOptionFromVendorLedgerEntry

[Line 570](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L570), local.

- [574](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L574) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [584](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L584) calls `UpdateStatusIfChanged`

## SetStatusOptionFromCancelledDocument

[Line 588](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L588), local.

- [592](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L592) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [606](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L606) calls `UpdateStatusIfChanged`

## UpdateStatusIfChanged

[Line 609](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L609), local.

- [614](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L614) calls `CheckUpdatesDisabled`
- [621](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L621) calls `SetStatusOptionFromPurchaseCreditMemoHeader`
- [623](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L623) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Modify(true)

## AssignTotalsFromPurchaseHeader

[Line 626](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L626), local.

- [634](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L634) calls `BlankTotals`
- [638](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L638) calls `AssignTotalsFromPurchaseLine`

## AssignTotalsFromPurchaseCreditMemoHeader

[Line 641](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L641), local.

- [648](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L648) calls `BlankTotals`
- [652](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L652) calls `AssignTotalsFromPurchaseCreditMemoLine`

## AssignTotalsFromPurchaseLine

[Line 655](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L655), local.

- [667](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L667) calls [Codeunit 57 Document Totals](https://jonas-paprotka.de/ref/codeunit/57-document-totals/) `CalculatePurchaseTotals`

## AssignTotalsFromPurchaseCreditMemoLine

[Line 675](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L675), local.

- [689](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L689) calls [Codeunit 57 Document Totals](https://jonas-paprotka.de/ref/codeunit/57-document-totals/) `CalculatePostedPurchCreditMemoTotals`

## BlankTotals

[Line 697](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L697), local.

- [704](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L704) calls `CheckUpdatesDisabled`
- [712](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L712) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Modify

## CheckValidLineRecord

[Line 726](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L726), local.

- [728](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L728) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`

## ModifyTotalsPurchaseLine

[Line 737](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L737), local.

- [742](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L742) calls [Codeunit 5465 Graph Mgt - General Tools](https://jonas-paprotka.de/ref/codeunit/5465-graph-mgt-general-tools/) `IsApiEnabled`
- [754](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L754) calls `CheckUpdatesDisabled`
- [760](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L760) calls `AssignTotalsFromPurchaseLine`
- [761](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L761) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Modify(true)

## TransferPurchaseCreditMemoLineAggregateToPurchaseLine

[Line 764](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L764), local.

- [772](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L772) calls [Codeunit 10 Type Helper](https://jonas-paprotka.de/ref/codeunit/10-type-helper/) `TransferFieldsWithValidate`

## TransferRecordIDs

[Line 777](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L777), local.

- [791](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L791) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Delete(true)
- [794](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L794) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `GetIsRenameAllowed`
- [795](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L795) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `SetIsRenameAllowed`
- [796](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L796) writes [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) Rename
- [797](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L797) calls [Table 5508 Purch. Cr. Memo Entity Buffer](https://jonas-paprotka.de/ref/table/5508-purch-cr-memo-entity-buffer/) `SetIsRenameAllowed`
- [801](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L801) writes [Table 124 Purch. Cr. Memo Hdr.](https://jonas-paprotka.de/ref/table/124-purch-cr-memo-hdr/) Modify(true)

## RedistributeCreditMemoDiscounts

[Line 804](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L804).

- [815](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L815) runs [Codeunit 66 Purch - Calc Disc. By Type](https://jonas-paprotka.de/ref/codeunit/66-purch-calc-disc-by-type/)

## LoadLines

[Line 820](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L820).

- [832](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L832) calls `LoadPurchaseCreditMemoLines`
- [834](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L834) calls `LoadPurchaseLines`

## LoadPurchaseCreditMemoLines

[Line 837](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L837), local.

- [850](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L850) calls [Codeunit 5477 Sales Invoice Aggregator](https://jonas-paprotka.de/ref/codeunit/5477-sales-invoice-aggregator/) `GetIdFromDocumentIdAndSequence`
- [853](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L853) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `SetTaxGroupIdAndCode`
- [860](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L860) calls [Table 125 Purch. Cr. Memo Line](https://jonas-paprotka.de/ref/table/125-purch-cr-memo-line/) `GetCurrencyCode`
- [862](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L862) calls [Table 5478 Purch. Inv. Line Aggregate](https://jonas-paprotka.de/ref/table/5478-purch-inv-line-aggregate/) `UpdateReferencedRecordIds`
- [863](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L863) calls `UpdateLineAmountsFromPurchaseInvoiceLine`
- [864](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L864) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `SetItemVariantId`
- [865](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L865) writes [Table 5478 Purch. Inv. Line Aggregate](https://jonas-paprotka.de/ref/table/5478-purch-inv-line-aggregate/) Insert(true)

## LoadPurchaseLines

[Line 869](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L869), local.

- [878](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L878) calls `TransferFromPurchaseLine`
- [879](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L879) writes [Table 5478 Purch. Inv. Line Aggregate](https://jonas-paprotka.de/ref/table/5478-purch-inv-line-aggregate/) Insert(true)

## TransferFromPurchaseLine

[Line 883](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L883), local.

- [892](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L892) calls [Codeunit 5477 Sales Invoice Aggregator](https://jonas-paprotka.de/ref/codeunit/5477-sales-invoice-aggregator/) `GetIdFromDocumentIdAndSequence`
- [894](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L894) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `SetTaxGroupIdAndCode`
- [902](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L902) calls [Table 5478 Purch. Inv. Line Aggregate](https://jonas-paprotka.de/ref/table/5478-purch-inv-line-aggregate/) `UpdateReferencedRecordIds`
- [903](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L903) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `UpdateLineAmountsFromPurchaseLine`
- [904](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L904) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `SetItemVariantId`

## PropagateInsertLine

[Line 907](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L907).

- [913](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L913) calls `VerifyCRUDIsPossibleForLine`
- [931](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L931) calls `TransferPurchaseCreditMemoLineAggregateToPurchaseLine`
- [932](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L932) writes [Table 39 Purchase Line](https://jonas-paprotka.de/ref/table/39-purchase-line/) Insert(true)
- [934](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L934) calls `RedistributeCreditMemoDiscounts`
- [937](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L937) calls `TransferFromPurchaseLine`

## PropagateModifyLine

[Line 940](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L940).

- [945](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L945) calls `VerifyCRUDIsPossibleForLine`
- [950](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L950) calls `TransferPurchaseCreditMemoLineAggregateToPurchaseLine`
- [952](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L952) writes [Table 39 Purchase Line](https://jonas-paprotka.de/ref/table/39-purchase-line/) Modify(true)
- [954](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L954) calls `RedistributeCreditMemoDiscounts`
- [957](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L957) calls `TransferFromPurchaseLine`

## PropagateDeleteLine

[Line 960](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L960).

- [965](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L965) calls `VerifyCRUDIsPossibleForLine`
- [968](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L968) writes [Table 39 Purchase Line](https://jonas-paprotka.de/ref/table/39-purchase-line/) Delete(true)
- [969](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L969) calls `RedistributeCreditMemoDiscounts`

## UpdateLineAmountsFromPurchaseInvoiceLine

[Line 999](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L999), local.

- [1003](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1003) calls [Table 125 Purch. Cr. Memo Line](https://jonas-paprotka.de/ref/table/125-purch-cr-memo-line/) `GetLineAmountExclVAT`
- [1004](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1004) calls [Table 125 Purch. Cr. Memo Line](https://jonas-paprotka.de/ref/table/125-purch-cr-memo-line/) `GetLineAmountInclVAT`
- [1007](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1007) calls [Codeunit 5529 Purch. Inv. Aggregator](https://jonas-paprotka.de/ref/codeunit/5529-purch-inv-aggregator/) `UpdateInvoiceDiscountAmount`

## CheckUpdatesDisabled

[Line 1018](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1018), local.

- [1023](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1023) calls [Codeunit 5532 Disable Aggregate Table Update](https://jonas-paprotka.de/ref/codeunit/5532-disable-aggregate-table-update/) `OnGetAggregateTablesUpdateEnabled`

## HandleApiSetup

[Line 1032](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1032), local.

- [1034](https://jonas-paprotka.de/ref/codeunit/5511-graph-mgt-purch-cr-memo/source/#L1034) calls `UpdateBufferTableRecords`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
