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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Which table in d365 st...
Finance forum

Which table in d365 stores the label id name & value

(0) ShareShare
ReportReport
Posted on by

Hi

In 2012 syselementmodellabel table used to store the labdel id, name & value, however i dont see any value stored in same table in d365.

Is it that in d365 does not stores label details in any table ?

  • Suggested answer
    Joris dG Profile Picture
    17,782 on at

    None of the metadata is stored in the database, it is all compiled into binaries (DLLs) and deployed that way. From X++ there are other ways to get labels, of course. And if you're looking to create design-time tools for developers, there are APIs to use (non-X++ but rather .NET/C#) to create Visual Studio add-ons.

  • Mav Profile Picture
    on at

    Want to create a functionality where user can enter label name to find the corresponding label details , like label id, label name & Label file name.

    Should I proceed with x++ or non x++, for x++ i think i have to use syslabel class's resolveLabels method for non x++ I would appreciate if you can share some example for API's.

  • Martin Dráb Profile Picture
    240,827 Most Valuable Professional on at

    Who is the "user" there? As end-users aren't usually interested in label files and things like that, it sounds more like a tool for developers.

    We could have answered it by ourselves if you explained the business problem you're trying to solve by this technical solution.

  • Mav Profile Picture
    on at

    A tool where a developer can enter label name in a dialog box , to find its corresponding

    a label id

    b.label file

    c.runtime label value

    d.designtime label value.

    Hopefully will see answers now instead of questions.

  • Verified answer
    Martin Dráb Profile Picture
    240,827 Most Valuable Professional on at

    Then you should forget about X++, because that's executed inside the web application at runtime. Create a Visual Studio add-in instead to get something useful for developers at development time.

    Start with creating a project. Instead of the usual Unified Operations project, choose "Developer Tools Add-in" project (under the same group). Unfortunately I'm not aware of any documentation, but you can find some examples on GitHub.

    Also look at this forum thread: How to get label ID from a label text in AX7/D365.

  • Sukrut Parab Profile Picture
    71,741 Moderator on at

    Hi Mav,

    Look at below link. This is not exactly what you are looking for but at least help you to go in some direction to create VS add in.

    stoneridgesoftware.com/learn-to-use-a-label-creator-add-in-extension-in-dynamics-365-for-finance-operations

  • Mav Profile Picture
    on at

    Using @Martin's "How to get Label id from label text " I have written this code.

    I have modified the code to compare the following label files.

    1.Sys label file

    2.Sys extension label file.

    What i m trying to accomplish is that compare sys label with sys extension label file.

    Each time there is a different label text value for same label id, info should trigger to highlight the difference in values for same label id.

    OUTPUT

    a>Microsoft.Dynamics.Ax.Xpp.ClrException::Starting at Microsoft.Dynamics.Ax.Xpp.CLRInterop.MakeReflection call........

    Further self investigation on error

    a>Inserted try & catch to find meaning of the above general CLR exception, using that I realized that

    System.MissingMethodException Method System.collection.generic.dictionary .Reset not found (Strange because I was getting no compile time errors and only build time errors)

    Which means I cannot reset the generic dictionary, but I need to reset the enumeration so that they both are at same position before comparing checks in.

    Can anyone extend support to fix this code.

    Code


            info ("Starting");
            int counter1 =0;
             new InteropPermission (InteropKind::ClrInterop).assert();   
                
            ClrObject labels = new ClrObject("System.Collections.Generic.Dictionary`2[System.String,System.String]");
            ClrObject labelset = new ClrObject("System.Collections.Generic.Dictionary`2[System.String,System.String]");

            labels = Microsoft.Dynamics.Ax.Xpp.LabelHelper::GetAllLabels('SYS',System.Globalization.CultureInfo::CurrentCulture);
            labelset = Microsoft.Dynamics.Ax.Xpp.LabelHelper::GetAllLabels('SYS_Extension',System.Globalization.CultureInfo::CurrentCulture);

            ClrObject labelsEnumerator = labels.GetEnumerator();
            ClrObject labelsetEnumerator = labelset.GetEnumerator();

            labelsEnumerator.reset();
            labelsetEnumerator.reset();

            while(labelsEnumerator.MoveNext() )
            {
                while (labelsetEnumerator.MoveNext() )
                {
                    ClrObject keyValuePair = labelsEnumerator.get_Current();
                    CLRObject keyvaluePairext = labelsetEnumerator.get_Current();

                    var currentlabelId = keyValuePair.get_Key();
                    var currentTxt = keyValuePair.get_Value();
                    var currentLabelext = keyvaluePairext.get_key();
                    var currentTxtext = keyvaluePairext.get_value();
                    if (currentlabelId == currentLabelext && currentTxt != currentTxtext)
                    {

                        counter1++;
                        info (strfmt("SYS label value %1 text = %2, SYS label extension value %3 = %4",currentlabelId,currentTxt,currentLabelext,currentTxtext));

                    }

                }
            }
            info (strFmt("Done, found so many difference %1",counter1));

            CodeAccessPermission::revertAssert();

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans