web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Create Dimension CreateDim() function changes - deprecated in V23

(1) ShareShare
ReportReport
Posted on by 18
Hi Experts!
 
I had this code and its going to be deprecated on V23 with a new variable List of List of [Dictionary of [Integer, Code[20]]] 
Any ideas how to replace the code :) ? Thanks in advance 
 
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at
    hi
     
    The error message you're seeing is because the CreateDim method of the Sales Line record expects an argument of type List of [Dictionary of [Integer, Code[20]]], which represents a list of dimensions. However, in your SetSetupAZTranslator procedure, you're calling salesline.CreateDim() without passing any argument.
    Here's a simplified example of how you might use the CreateDim method:
     
    procedure createDim()
    var
        SalesLine: Record "Sales Line";
        DimValueList: List of [Dictionary of [Integer, Code[20]]];
        DimValue: Dictionary of [Integer, Code[20]];
    begin
        // Initialize the DimValue dictionary
        DimValue := DimValue.Create(1, 'DIM001');
     
        // Add the DimValue dictionary to the DimValueList list
        DimValueList.Add(DimValue);
     
        // Call the CreateDim method with the DimValueList list
        SalesLine.CreateDim(DimValueList);
    end;
     
     

    In this example, a new dimension is created by initializing a Dictionary of [Integer, Code[20]] (which represents a single dimension with a dimension ID and a dimension value) and adding it to a List of [Dictionary of [Integer, Code[20]]] (which represents a list of dimensions). The CreateDim method is then called with this list of dimensions.

  • Verified answer
    ThathsaraH Profile Picture
    18 on at
    Here I found a solution. Check all parameters of CreateDim() function. There is a pattern as Type1 - No1 , Type2 - No2 ... We can use this as the key and value.
     
     
    I added this pattern to the list of dictionary. Here I defined the DimSource List if Dictionary and DimDictionary.
    Then , used like this.
     
     
    Hope this will helpful.
    Thanks !
     

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,175

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,476 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,435 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans