How do I add one or more dimension (480 - Dimension Entry Set) to a Gen. Journal Line programmatically?
It must be one line of code to be called ...
I can't find that one line of code - therefore I have tried:
DimensionSetEntryRec_L.VALIDATE("Dimension Code",<Code>);
DimensionSetEntryRec_L.VALIDATE("Dimension Value Code",<Value>);
DimensionSetEntryRec_L.INSERT(TRUE);
DimensionSetEntryRec_L.GetDimensionSetID(DimensionSetEntryRec_L);
DimSetID_L := DimensionManagementCU_L.GetDimensionSetID(DimensionSetEntryRec_L);
GenJournalLineRec_L."Dimension Set ID" := DimSetID_L;
GenJournalLineRec_L.MODIFY(TRUE);
It seems to Work for the first line I create, but not the NeXT one and the rest of the lines
0
Comments
Then call:
NewDimID := DimMgt.GetDimensionSetID(TempDimSetEntry);
The DimMgt.GetDimensionSetID will automatically add missing entries.
Microsoft - Dynamics NAV