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 :
Finance | Project Operations, Human Resources, ...
Answered

How to use the label description of and EDT or field ?

(0) ShareShare
ReportReport
Posted on by

Hi,

in my code, instead using "words" for a message, I want to use the label description of an EDT, can I do that and how ?

For example I have message : info("Item number cannot be empty"), Instead type it manually I want to use like strfmt("%1 cannot be empty", <label of EDT ItemId>)

Thanks,

I have the same question (0)
  • Suggested answer
    Komi Siabi Profile Picture
    13,107 Most Valuable Professional on at

    You should add a new text in your label file. Copy by right  click and Copy the label ID, and paste in your info. It will start with an @ .

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi VoltesDev,

    info(strfmt("%1",@LabelId:LabelId));

    You can just copy the label id from label file and you can paste it.

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    on at

    Hi both,

    Yes, but in that case it is because first I know the label ID that being used in my EDT. Can I just know the EDT then there is some function to get its label id ? So I just type the EDT name or perhaps later a field name from a table, then it will show us its label description.

    Btw, my EDT or my field's label already has its label Id set.

    Thanks

  • Suggested answer
    Komi Siabi Profile Picture
    13,107 Most Valuable Professional on at

    The system on its own has an error that display when a field you set to be mandatory is not inputted.

    When you are deliberately info-ing a message, you must specify the message by yourself by either type the message raw or using a label ID which will contain the actual message.

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    As komi mentioned, there is no need to get the EDT of the label via code. You can either set it on the table - form control - data type levels or just copy paste the label id on the info message.

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    on at

    Sorry, I probably not describe it clearly.

    This is actually what I'm using and trying to do -> throw error(strFmt("@SYS136411", <myfied>)

    The @SYS136411 is basically translated as "%1 cannot be empty", so I want the %1 showing my field's label description, but I'm thinking I do not want to find first what is the label Id that I'm using, instead is there a function to get it them self when I only use  (write) my field name, or for example the EDT name : ItemID, it will show the label "Item number".

    Thanks

  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at

    In that case you need to code like that.

    info(strfmt("@LableId:LabelId",fieldPName(YourTableName,YourFieldName)));

    This will return the fields label description.

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    on at

    Ahh yes, this is what I'm looking for. 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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans