---
id: object/codeunit/5465
type: object
title: Codeunit 5465 "Graph Mgt - General Tools"
summary: Codeunit 5465 "Graph Mgt - General Tools" in Base Application (Microsoft.Integration.Graph). 17 public procedures, 3 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC25.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "25"
  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: 2e1d2f499a0e452d90fb2edc41ea707293747e229336ff580ac4bc7067fc264c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Graph/GraphMgtGeneralTools.Codeunit.al
    title: src/Layers/W1/BaseApp/Integration/Graph/GraphMgtGeneralTools.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: 5465
name: Graph Mgt - General Tools
namespace: Microsoft.Integration.Graph
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 23
  events: 3
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 15
  calls: 6
  called_by: 57
  implements: 0
---

# Codeunit 5465 "Graph Mgt - General Tools"

> Codeunit 5465 "Graph Mgt - General Tools" in Base Application (Microsoft.Integration.Graph). 17 public procedures, 3 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC25.

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

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |
| Permissions | TableData "Sales Invoice Header" = rimd, TableData "Sales Cr.Memo Header" = rimd, TableData "Purch. Inv. Header" = rimd |

## Events published

- `ApiSetup()` (integration)
  - subscribers: [Codeunit 5011 "Graph Mgt - Vendor Payments"](../codeunit/5011.md) HandleApiSetup, [Codeunit 5468 "Graph Mgt - Complex Types"](../codeunit/5468.md) HandleApiSetup, [Codeunit 5470 "Graph Collection Mgt - Item"](../codeunit/5470.md) HandleApiSetup, [Codeunit 5471 "Graph Mgt - Customer"](../codeunit/5471.md) HandleApiSetup, [Codeunit 5472 "Graph Mgt - Vendor"](../codeunit/5472.md) HandleApiSetup, [Codeunit 5474 "Graph Mgt - Sales Header"](../codeunit/5474.md) HandleApiSetup, [Codeunit 5475 "Graph Mgt - Sales Invoice"](../codeunit/5475.md) HandleApiSetup, [Codeunit 5478 "Graph Mgt - Journal Lines"](../codeunit/5478.md) HandleApiSetup, [Codeunit 5479 "Graph Mgt - Customer Payments"](../codeunit/5479.md) HandleApiSetup, [Codeunit 5495 "Graph Mgt - Sales Order"](../codeunit/5495.md) HandleApiSetup, [Codeunit 5505 "Graph Mgt - Sales Quote"](../codeunit/5505.md) HandleApiSetup, [Codeunit 5507 "Graph Mgt - Sales Credit Memo"](../codeunit/5507.md) HandleApiSetup, [Codeunit 5511 "Graph Mgt - Purch. Cr. Memo"](../codeunit/5511.md) HandleApiSetup, [Codeunit 5527 "Graph Mgt - Purchase Invoice"](../codeunit/5527.md) HandleApiSetup
- `OnGetIsAPIEnabled(var Handled: Boolean; var IsAPIEnabled: Boolean)` (integration)
  - subscribers: [Codeunit 5691 "Create Contoso Tenant Data"](../codeunit/5691.md) GetIsAPIEnabled
- `OnGetAPISubscriptionsEnabled(var Handled: Boolean; var APISubscriptionsEnabled: Boolean)` (integration)

## Event subscriptions

- InitDemoCompanyApisForSaaS subscribes to Codeunit "Company-Initialize" OnCompanyInitialize
- OnDeleteConfigTemplates subscribes to Table "Config. Template Header" OnAfterDeleteEvent

## Procedures

- `GetMandatoryStringPropertyFromJObject(var JsonObject: DotNet JObject; PropertyName: Text; var PropertyValue: Text)`
- `HandleUpdateReferencedIdFieldOnItem(var RecRef: RecordRef; NewId: Guid; var Handled: Boolean; DatabaseNumber: Integer; RecordFieldNumber: Integer)`
- `InsertOrUpdateODataType(NewKey: Code[50]; NewDescription: Text[250]; OdmDefinition: Text)`
- `ProcessNewRecordFromAPI(var InsertedRecordRef: RecordRef; var TempFieldSet: Record "Field"; ModifiedDateTime: DateTime)`
- `ProcessNewRecordFromAPI(var InsertedRecordRef: RecordRef; var TempFieldSet: Record "Field"; ModifiedDateTime: DateTime; var ConfigTemplateHeader: Record "Config. Template Header")`
- `ErrorIdImmutable()`
- `ErrorLastDateTimeModifiedImmutable()`
- `IsApiEnabled(): Boolean`
- `IsApiSubscriptionEnabled(): Boolean`
- `APISetupIfEnabled()`
- `TranslateNAVCurrencyCodeToCurrencyCode(var CachedLCYCurrencyCode: Code[10]; CurrencyCode: Code[10]): Code[10]`
- `TranslateCurrencyCodeToNAVCurrencyCode(var CachedLCYCurrencyCode: Code[10]; CurrentCurrencyCode: Code[10]): Code[10]`
- `TransferRelatedRecordIntegrationIDs(var OriginalRecordRef: RecordRef; var UpdatedRecordRef: RecordRef; var TempRelatedRecodIdsField: Record "Field")`
- `CleanAggregateWithoutParent(MainRecordVariant: Variant)`
- `ScheduleUpdateAPIRecordsJob(CodeunitID: Integer)`
- `StripBrackets(StringWithBrackets: Text): Text`
- `GetIdWithoutBrackets(Id: Guid): Text`

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 6723 "Server Setting"](../codeunit/6723.md) (2 calls: `IsApiEnabled → GetApiServicesEnabled`, `IsApiSubscriptionEnabled → GetApiSubscriptionsEnabled`)
- [Codeunit 453 "Job Queue - Enqueue"](../codeunit/453.md) (1 call: `ScheduleUpdateAPIRecordsJob → (object)`)
- [Codeunit 457 "Environment Information"](../codeunit/457.md) (1 call: `InitDemoCompanyApisForSaaS → IsSaaS`)
- [Codeunit 5459 "JSON Management"](../codeunit/5459.md) (1 call: `GetMandatoryStringPropertyFromJObject → GetStringPropertyValueFromJObjectByName`)
- [Codeunit 8612 "Config. Template Management"](../codeunit/8612.md) (1 call: `ProcessNewRecordFromAPI → ApplyTemplate`)
- [Page 673 "Job Queue Entry Card"](../page/673.md) (1 call: `ScheduleUpdateAPIRecordsJob → (object)`)

## Called by

- [Codeunit 5477 "Sales Invoice Aggregator"](../codeunit/5477.md) (26 calls: `CheckValidLineRecord → IsApiEnabled`, `GetIdFromDocumentIdAndSequence → StripBrackets`, `OnAfterCalculateSalesDiscountOnSalesHeader → IsApiEnabled`, …)
- [Codeunit 5508 "Graph Mgt - Sal. Cr. Memo Buf."](../codeunit/5508.md) (25 calls: `CheckValidLineRecord → IsApiEnabled`, `ModifyTotalsSalesLine → IsApiEnabled`, `OnAfterCalculateSalesDiscountOnSalesHeader → IsApiEnabled`, …)
- [Codeunit 5511 "Graph Mgt - Purch. Cr. Memo"](../codeunit/5511.md) (25 calls: `CheckValidLineRecord → IsApiEnabled`, `ModifyTotalsPurchaseLine → IsApiEnabled`, `OnAfterCalculatePurchaseDiscountOnPurchaseHeader → IsApiEnabled`, …)
- [Codeunit 5529 "Purch. Inv. Aggregator"](../codeunit/5529.md) (25 calls: `CheckValidLineRecord → IsApiEnabled`, `ModifyTotalsPurchaseLine → IsApiEnabled`, `OnAfterCalculatePurchaseDiscountOnPurchaseHeader → IsApiEnabled`, …)
- [Codeunit 5506 "Graph Mgt - Sales Quote Buffer"](../codeunit/5506.md) (10 calls: `CheckValidLineRecord → IsApiEnabled`, `OnAfterCalculateSalesDiscountOnSalesHeader → IsApiEnabled`, `OnAfterDeleteSalesHeader → IsApiEnabled`, …)
- [Codeunit 5496 "Graph Mgt - Sales Order Buffer"](../codeunit/5496.md) (9 calls: `CheckValidLineRecord → IsApiEnabled`, `OnAfterCalculateSalesDiscountOnSalesHeader → IsApiEnabled`, `OnAfterDeleteSalesHeader → IsApiEnabled`, …)
- [Codeunit 5497 "Graph Mgt - Purch Order Buffer"](../codeunit/5497.md) (9 calls: `CheckValidLineRecord → IsApiEnabled`, `OnAfterCalculatePurchaseDiscountOnPurchaseHeader → IsApiEnabled`, `OnAfterDeletePurchaseHeader → IsApiEnabled`, …)
- [Codeunit 5468 "Graph Mgt - Complex Types"](../codeunit/5468.md) (7 calls: `ApplyPostalAddressFromJSON → GetMandatoryStringPropertyFromJObject`, `GetCodeAndDescriptionFromJSON → GetMandatoryStringPropertyFromJObject`, `GetDimensionFromJObject → GetMandatoryStringPropertyFromJObject`, …)
- [Codeunit 5470 "Graph Collection Mgt - Item"](../codeunit/5470.md) (6 calls: `InsertItem → ProcessNewRecordFromAPI`, `InsertItemFromSalesDocument → ProcessNewRecordFromAPI`, `ModifyItem → ProcessNewRecordFromAPI`, …)
- [Codeunit 6153 "API Webhook Notification Mgt."](../codeunit/6153.md) (4 calls: `GetDatabaseTableTriggerSetup → IsApiSubscriptionEnabled`, `GetRawFieldValue → GetIdWithoutBrackets`, `IsApiSubscriptionEnabled → IsApiSubscriptionEnabled`, …)
- [Codeunit 6154 "API Webhook Notification Send"](../codeunit/6154.md) (2 calls: `GetAadUserId → StripBrackets`, `IsApiSubscriptionEnabled → IsApiSubscriptionEnabled`)
- [Page 20009 "APIV1 - Customers"](../page/20009.md) (2 calls: `OnInsertRecord → ProcessNewRecordFromAPI`, `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 20010 "APIV1 - Vendors"](../page/20010.md) (2 calls: `OnInsertRecord → ProcessNewRecordFromAPI`, `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30009 "APIV2 - Customers"](../page/30009.md) (2 calls: `OnInsertRecord → ProcessNewRecordFromAPI`, `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30010 "APIV2 - Vendors"](../page/30010.md) (2 calls: `OnInsertRecord → ProcessNewRecordFromAPI`, `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 9861 "AAD Application Card"](../page/9861.md) (2 calls: `GrantConsent → StripBrackets`, `OnAfterGetCurrRecord → StripBrackets`)
- [Table 27 "Item"](../table/27.md) (2 calls: `UpdateItemCategoryId → IsApiEnabled`, `UpdateReferencedIds → IsApiEnabled`)
- [Codeunit 5153 "API - Upd. Ref. Fields Binder"](../codeunit/5153.md) (1 call: `BindApiUpdateRefFields → IsApiEnabled`)
- [Codeunit 5509 "Graph Mgt - Inc Doc Attachment"](../codeunit/5509.md) (1 call: `UpdateRelatedDocument → IsApiEnabled`)
- [Codeunit 5513 "Graph Mgt - Time Registration"](../codeunit/5513.md) (1 call: `CreateResourceToUseTimeSheet → ProcessNewRecordFromAPI`)
- [Codeunit 5691 "Create Contoso Tenant Data"](../codeunit/5691.md) (1 call: `SetupAPIs → ApiSetup`)
- [Page 20012 "APIV1 - Sales Invoices"](../page/20012.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 20017 "APIV1 - Employees"](../page/20017.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20019 "APIV1 - Currencies"](../page/20019.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20020 "APIV1 - Payment Methods"](../page/20020.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20023 "APIV1 - Payment Terms"](../page/20023.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20024 "APIV1 - Shipment Methods"](../page/20024.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20025 "APIV1 - Item Categories"](../page/20025.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20027 "APIV1 - Countries/Regions"](../page/20027.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20028 "APIV1 - Sales Orders"](../page/20028.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 20030 "APIV1 - Units of Measure"](../page/20030.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 20037 "APIV1 - Sales Quotes"](../page/20037.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 20038 "APIV1 - Sales Credit Memos"](../page/20038.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 20042 "APIV1 - Purchase Invoices"](../page/20042.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30012 "APIV2 - Sales Invoices"](../page/30012.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30017 "APIV2 - Employees"](../page/30017.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30019 "APIV2 - Currencies"](../page/30019.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30020 "APIV2 - Payment Methods"](../page/30020.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30023 "APIV2 - Payment Terms"](../page/30023.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30024 "APIV2 - Shipment Methods"](../page/30024.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30025 "APIV2 - Item Categories"](../page/30025.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30027 "APIV2 - Countries/Regions"](../page/30027.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30028 "APIV2 - Sales Orders"](../page/30028.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30030 "APIV2 - Units of Measure"](../page/30030.md) (1 call: `OnInsertRecord → ProcessNewRecordFromAPI`)
- [Page 30037 "APIV2 - Sales Quotes"](../page/30037.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30038 "APIV2 - Sales Credit Memos"](../page/30038.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30042 "APIV2 - Purchase Invoices"](../page/30042.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30051 "APIV2 - Bank Accounts"](../page/30051.md) (1 call: `LoadCurrencyInformation → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30062 "APIV2 - Sales Shipments"](../page/30062.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Page 30064 "APIV2 - Purchase Receipts"](../page/30064.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- and 7 more: data/code/graph/29/calls.json

## Across versions

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

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