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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Modify Label in Dynamics 365 with x++.

(0) ShareShare
ReportReport
Posted on by 55

Hello everyone,


Someone knows how to modify a label using code x ++ in dynamics 365, I have tried with the modify method of the class SysLabel, but this method always returns me False I have tried changing the parameters, but it never works. Agradesco who can help me, Thank you.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Modify Label in Dynamics 365 with x++.

    If the users should be able to change the caption of the form globally, by changing some setting in the system, labels are not ideal for that.

    Instead the user input should be saved to a new setup table, and in the form's init method, assigned to the caption property.

    You could even have language support, if you add languageId as a field to your setup table.

  • Verified answer
    Martin Dráb Profile Picture
    235,796 Most Valuable Professional on at
    RE: Modify Label in Dynamics 365 with x++.

    If different users (or users in different companies) should be able to set different values, changing the label wouldn't work anyway, because it would change for everyone.

    If you manage to change the resource file (which you can't), you would achieve very little, because the change would be lost at the next deployment of the package.

    I wonder what's the actual business requirement that you decided to solve by this technical solution. Maybe they should simply request a minor change and get it delivered in the usual way, assuming that you own the label file and can make changes. If not, you may also need to update properties to use a new label ID from your own package. Or maybe you need something more complicated, e.g. if you want different users to set different values.

  • Victor H. Cortes  Profile Picture
    55 on at
    RE: Modify Label in Dynamics 365 with x++.

    Hello Martin,

    I would like to modify the label text, I need the label of a form to be dynamic, the user will have the option of assigning the name to the form and changing it whenever he wants.

    The reason why I do not use the caption property of the form is because I need to change the text of the label globally.

    Is this possible?

  • Suggested answer
    Rudi Hansen Profile Picture
    4,055 on at
    RE: Modify Label in Dynamics 365 with x++.

    In AX2012 you could use SysLabelEdit.labelModify but it seem that class does not exist in AX365.

    But like with all other development elements in AX365, if you change the file for the element, the element will also be changed in the application, so if you find the label file in the folder C:\AOSService\PackagesLocalDirectory, you can change the file directly. (Will not work in production only on you development enviroment)

  • Martin Dráb Profile Picture
    235,796 Most Valuable Professional on at
    RE: Modify Label in Dynamics 365 with x++.

    Please tell us what you're trying to achieve, so we can suggest a solution that actually can be done.

    Labels are compiled to .NET resource files; you can't change them at runtime.

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
KP-31070522-0 Profile Picture

KP-31070522-0 3

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans