Hi Experts,
I want to Update Global Dimension 1 (Business Unit) and Global Dimension 2 (District Code) onValidate() trigger of Location Code in Item Journal Line table. I have already assigned dimensions to every Location that I have. Now I want to update them in Item Journal through Item Journal Line table (OnValidate of Location Code as mentioned earlier).
Is there any standard way in NAV, to perform this activity?
This requirement is on urgent basis and I would appreciate any help/suggestion regarding this.
Thanks in advance.
*This post is locked for comments
Hi,
Thank you all for your suggestions.
I had solved the issue by using CreateDim function by adding Location Code as an additional Parameter.
Add the code in the OnAfterValidate of the Location code to update the Shortcut Dimension 1 Code and Dimension 2 Code.
ItemJnlLine."Shortcut Dimension 1 Code" := 'abc..';
ItemJnlLine."Shortcut Dimension 2 Code" := 'a1222'
DimMgt.UpdateGlobalDimFromDimSetID(
ItemJnlLine."Dimension Set ID",ItemJnlLine."Shortcut Dimension 1 Code",ItemJnlLine."Shortcut Dimension 2 Code");
Go to Item Journal Line and take a look at how they do Dimension when validating the Item No.
You will need to follow the same rule and replicate it to Location Code.
Thank you for your quick reply.
Can you please elaborate as to how that can be done based on Location Code?
No for standard , you need to customize a bit for that. On Item Journal , standard only populate dimension based on default dimension in Item, Salesperson and workcenter.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156