---
title: "Codeunit 5701 Item Subst."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5701-item-subst/
type: codeunit
id: 5701
name: "Item Subst."
app: "Base Application"
namespace: Microsoft.Inventory.Item.Substitution
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5701-item-subst/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5701 Item Subst.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5701-item-subst/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Inventory.Item.Substitution |
| Versions | 17-28 |
| Source file | Inventory/Item/Substitution/ItemSubst.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| ItemSubstGet | (var Record Sales Line) | Boolean | public | 17-28 | - | - |
| ItemServiceSubstGet | (var Record Service Line) | - | public | 17-27 | Pending 25.0 | Moved to codeunit ServItemSubstitution |
| GetCompSubst | (var Record Prod. Order Component) | - | public | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution as GetProdOrderCompSubst() |
| UpdateComponent | (var Record Prod. Order Component, Code[20], Code[10]) | - | public | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution as UpdateProdOrderComp() |
| PrepareSubstList | (Code[20], Code[10], Code[10], Date, Boolean) | Boolean | public | 17-28 | Pending 26.0 | Replaced by procedure FindItemSubstitutions() |
| GetTempItemSubstList | (var Record Item Substitution) | - | public | 17-28 | Pending 26.0 | Use procedure FindItemSubstitutions with parameters TempItemSubstitutions instead. |
| ErrorMessage | (Code[20], Code[10]) | - | public | 17-28 | - | - |
| ItemAssemblySubstGet | (var Record Assembly Line) | - | public | 17-28 | - | - |
| CalcCustPrice | (var Record Item Substitution, var Record Item Substitution, var Record Sales Line) | - | public | 18-28 | - | - |
| RunOnInsertInSubstServiceListOnAfterCalcQtyAvail | (var Record Item, Record Service Line, var Record Item Substitution) | - | internal | 25-28 | - | - |
| RunOnInsertInSubstServiceListOnBeforeCalcQtyAvail | (var Record Item, Record Service Line, var Record Item Substitution) | - | internal | 25-28 | - | - |
| FindItemSubstitutions | (var Record Item Substitution, Code[20], Code[10], Code[10], Date, Boolean, var Decimal, var Decimal) | Boolean | public | 26-28 | - | - |
| RunOnAfterGetCompSubst | (var Record Prod. Order Component, var Record Item Substitution) | - | internal | 26-28 | - | - |
| RunOnAfterUpdateComponentBeforeAssign | (var Record Prod. Order Component, var Record Prod. Order Component) | - | internal | 26-28 | - | - |
| RunOnBeforeUpdateComponent | (var Record Prod. Order Component, Code[20], Code[10], var Boolean) | - | internal | 26-28 | - | - |
| RunOnGetCompSubstOnAfterCheckPrepareSubstList | (var Record Prod. Order Component, var Record Item Substitution, var Record Item, var Decimal, var Decimal) | - | internal | 26-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterGetCompSubst | (var Record Prod. Order Component, var Record Item Substitution) | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution |
| Integration event | OnAfterItemSubstGet | (var Record Sales Line, Record Sales Line) | 17-28 | - | - |
| Integration event | OnAfterUpdateComponentBeforeAssign | (var Record Prod. Order Component, var Record Prod. Order Component) | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution |
| Integration event | OnBeforeUpdateComponent | (var Record Prod. Order Component, Code[20], Code[10], var Boolean) | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution |
| Integration event | OnCalcCustPriceOnAfterCalcQtyAvail | (var Record Item, Record Sales Line, var Record Item Substitution) | 17-28 | - | - |
| Integration event | OnCalcCustPriceOnBeforeCalcQtyAvail | (var Record Item, Record Sales Line, var Record Item Substitution, Record Item Substitution) | 17-28 | - | - |
| Integration event | OnAssemblyCalcCustPriceOnAfterCalcQtyAvail | (var Record Item, Record Assembly Line, var Record Item Substitution) | 17-28 | - | - |
| Integration event | OnAssemblyCalcCustPriceOnBeforeCalcQtyAvail | (var Record Item, Record Assembly Line, var Record Item Substitution) | 17-28 | - | - |
| Integration event | OnBeforeCalcCustPrice | (var Record Item Substitution, Record Sales Line, var Boolean) | 17-21 | - | - |
| Integration event | OnBeforeItemSubstGetPopulateTempSalesLine | (var Record Sales Line, var Record Item Substitution, var Boolean) | 17 | - | - |
| Integration event | OnInsertInSubstServiceListOnAfterCalcQtyAvail | (var Record Item, Record Service Line, var Record Item Substitution) | 17-28 | Pending 25.0 | Moved to codeunit ServItemSubstitution |
| Integration event | OnInsertInSubstServiceListOnBeforeCalcQtyAvail | (var Record Item, Record Service Line, var Record Item Substitution) | 17-28 | Pending 25.0 | Moved to codeunit ServItemSubstitution |
| Integration event | OnCreateSubstListOnAfterCalcQtyAvail | (var Record Item, Record Prod. Order Component, var Record Item Substitution) | 17-28 | Pending 26.0 | Replaced by event OnCreateSubstListOnAfterCalcQuantityAvailable |
| Integration event | OnCreateSubstListOnBeforeCalcQtyAvail | (var Record Item, Record Prod. Order Component, var Record Item Substitution) | 17-28 | Pending 26.0 | Replaced by event OnCreateSubstListOnBeforeCalcQuantityAvailable |
| Integration event | OnGetCompSubstOnAfterCheckPrepareSubstList | (var Record Prod. Order Component, var Record Item Substitution, var Record Item, var Decimal, var Decimal) | 17-28 | Pending 26.0 | Moved to codeunit Mfg. Item Substitution |
| Integration event | OnItemSubstGetOnAfterSubstSalesLineItem | (var Record Sales Line, var Record Sales Line, var Record Item Substitution) | 17-28 | - | - |
| Integration event | OnItemSubstGetOnAfterItemSubstitutionSetFilters | (var Record Item Substitution) | 17-28 | - | - |
| Integration event | OnItemSubstGetOnAfterTempItemSubstitutionSetFilters | (var Record Item Substitution) | 17-21 | - | - |
| Integration event | OnCalcCustPriceOnBeforeTempItemSubstitutionInsert | (var Record Item Substitution, Record Item Substitution) | 17-28 | - | - |
| Integration event | OnBeforeItemSubstGetPopulateTempSalesLine | (var Record Sales Line, var Record Item Substitution, var Boolean, Code[20], Code[10]) | 18-28 | - | - |
| Integration event | OnBeforeSaveItemSalesUOM | (var Code[10], Record Item, var Boolean) | 19-28 | - | - |
| Integration event | OnBeforeCalcCustPrice | (var Record Item Substitution, Record Sales Line, var Boolean, Record Item) | 22-28 | - | - |
| Integration event | OnItemSubstGetOnAfterTempItemSubstitutionSetFilters | (var Record Item Substitution, var Record Sales Line, var Record Sales Line, Code[10], var Boolean) | 22-28 | - | - |
| Integration event | OnCreateSubstListOnAfterCalcQuantityAvailable | (var Record Item, var Record Item Substitution) | 26-28 | - | - |
| Integration event | OnCreateSubstListOnBeforeCalcQuantityAvailable | (var Record Item, var Record Item Substitution) | 26-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
