Notifications
Announcements
No record found.
DimMgt.GetDimensionSetID
var DimVal: Record "Dimension Value"; TempDimSetEntry: Record "Dimension Set Entry" temporary; DimMgt: Codeunit "DimensionManagement"; SalesHeader: Record "Sales Header"; begin // Get the dimension value record DimVal.Get('SALESPERSON', 'SK'); // Build a temporary dimension set entry TempDimSetEntry.Init(); TempDimSetEntry.Validate("Dimension Code", DimVal."Dimension Code"); TempDimSetEntry.Validate("Dimension Value Code", DimVal."Code"); TempDimSetEntry."Dimension Value ID" := DimVal."Dimension Value ID"; TempDimSetEntry.Insert(); // Assign the Dimension Set ID to your record SalesHeader."Dimension Set ID" := DimMgt.GetDimensionSetID(TempDimSetEntry); SalesHeader.Insert();
This is the same method Business Central uses internally, and it ensures proper dimension tracking and posting behavior.
✅ Mark this answer as verified if it helps you.
Hi, good day I hope this can help you, and give you some hints.
Solved: GetDimensionSetID on ChangeCompany
Business Central - purchase line - update shortcut/global dimensions — mibuso.com
Best Regards Gerardo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,229
Jainam M. Kothari 1,867 Super User 2025 Season 2
YUN ZHU 1,153 Super User 2025 Season 2