Introduction
A new Item Reference feature was introduced in Business Central 17 (2020 fall release). A description of the feature can be found here.
The feature introduce a new 'Item Reference'-table, basically a copy of the existing 'Item Cross Reference'-table with a field extended, another field shortened and options converted to enums.
As the feature can be enabled or disabled (though not disabled once enabled), we will have several different possible Item Reference / Item Cross Reference setups going forward (using table...):
- Item Cross Reference in Business Central 16 (or earlier), feature is unavailable and table Item Reference do no exist in database
- Item Cross Reference in Business Central 17 (feature 'ItemReference' disabled)
- Item Reference in Business Central 17 (feature 'ItemReference' enabled)
- Item Reference in Business Central 18 (when released, feature 'ItemReference' always enabled)
- Item Reference in Business Central 19 (when released, table Item Cross Reference will no longer exist in database)
New codeunits
To be able to accomodate all combinations in the same codebase, two new codeunits have been implemented in MOB5.23 (or newer):
- Codeunit 'MOB Item Cross Reference Mgt.' - Every existing reference to table 'Item Cross Reference' have been moved to here
- Codeunit 'MOB Item Reference Mgt.' - Includes same methods as Item Cross Reference Mgt. but for the new 'Item Reference'-table
Rewriting your existing code
You should always use new procedures in 'MOB Item Reference Mgt.'. Your function calls will be automatically redirected to 'MOB Item Cross Reference Mgt.' as needed, based on setup.
However, you will need to subscribe integrationevents specific for the table currently holding your data (in either of the two codeunits mentioned above).
For MOB5.23 functions and events from older versions have been moved accordingly to this list:
Type | Old name prior to MOB5.23 | Replaced by in MOB 5.23 |
---|---|---|
Search | ||
procedure | MobToolbox.ScannedItemNumber2RecRef() | MobItemReferenceMgt.ScannedItemNumber2RecRef() |
procedure | MobWmsToolbox.CheckCrossRef() | MobItemReferenceMgt.SearchItemReference() |
procedure | MobWmsToolbox.SearchItemCrossRef() | MobItemReferenceMgt.SearchItemReference() |
integrationevent | MobWmsToolbox.OnBeforeSearchItemCrossRef | MobItemReferenceMgt.OnBeforeSearchItemReference (same event for 'Item Cross Reference' and 'Item Reference') |
integrationevent | MobWmsToolbox.OnSearchItemCrossRefOnAfterSetFilters | MobItemReferenceMgt.OnSearchItemReferenceOnAfterSetFilters MobItemCrossReferenceMgt.OnSearchItemCrossRefOnAfterSetFilters |
BarcodeList | ||
procedure | MobWmsToolbox.CheckCrossRefItem() | MobItemReferenceMgt.GetBarcodeList |
procedure | MobWmsToolbox.CheckCrossRefItemQty() | MobItemReferenceMgt.GetBarcodeQuantityList |
procedure | MobWmsToolbox.GetItemCrossRefList() | MobItemReferenceMgt.GetBarcodeList |
procedure | MobWmsToolbox.GetItemCrossRefBarcodeQuantityList | MobItemReferenceMgt.GetBarcodeQuantityList |
procedure | MobWmsToolbox.GetFirstItemCrossRef | MobItemReferenceMgt.GetFirstReferenceNo |
integrationevent | MobWmsToolbox.OnBeforeGetItemCrossRefList | MobItemReferenceMgt.OnBeforeGetBarcodeList (same event for 'Item Cross Reference' and 'Item Reference') |
integrationevent | MobWmsToolbox.OnGetItemCrossRefListOnAfterSetFilters | MobItemReferenceMgt.OnGetBarcodeListOnAfterSetFilters MobItemCrossReferenceMgt.OnGetBarcodeListOnAfterSetFilters |
integrationevent | MobWmsToolbox.OnAfterGetItemCrossRefList | MobItemReferenceMgt.OnAfterGetBarcodeList (same event for 'Item Cross Reference' and 'Item Reference') |
Posting | ||
integrationevent | MobWmsAdhocRegistr. | MobItemReferenceMgt. MobItemCrossReferenceMgt. |