Hi,
On Item table (I guess also all other master tables) on OnInsert trigger there is a call to DimMgt.UpdateDefaultDim.
OnInsert()
IF "No." = '' THEN BEGIN
GetInvtSetup;
InvtSetup.TESTFIELD("Item Nos.");
NoSeriesMgt.InitSeries(InvtSetup."Item Nos.",xRec."No. Series",0D,"No.","No. Series");
END;
DimMgt.UpdateDefaultDim(
DATABASE::Item,"No.",
"Global Dimension 1 Code","Global Dimension 2 Code");
The thing is that when onInsert trigger is executed, "Default Dimension" can't have values for that specific rec. On the other side code for No. Series will assign some value to the "No." before DimMgt.UpdateDefaultDim call, so even Account Type Default Dim can't be assigned to "Global Dimension 1 Code" and "Global Dimension 2 Code" fields of Item rec.
Does anyone knows what else this code might do? Am I missing something?