Codeunit 5524 API Fix Item Cat. Code

Base Application, Microsoft.API.Upgrade

Source AL, 25 lines

src/Layers/W1/BaseApp/System/API/Upgrade/APIFixItemCatCode.Codeunit.allines 5 to 20 of 25, Copyright (c) Microsoft Corporation. MIT

codeunit 5524 "API Fix Item Cat. Code"{    trigger OnRun()    var        Item: Record "Item";        Item2: Record "Item";        ItemCategory: Record "Item Category";    begin        Item.SetLoadFields(Item."Item Category Id", Item."Item Category Code");        Item.SetRange(Item."Item Category Code", '');        if Item.FindSet() then            repeat                Item2 := Item;                if ItemCategory.GetBySystemId(Item2."Item Category Id") then begin                    Item2."Item Category Code" := ItemCategory."Code";                    Item2.Modify();

All 25 lines