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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

SysWorkflowTracking label

(0) ShareShare
ReportReport
Posted on by 351

Hi all,

I want to get label to another language.

Table name : WorkflowTrackingStatusTable

Field name  : DocumentType

As i mentioned above documentType field list of tableid name store in the WorkflowTrackingStatusTable table.

Now, i want to get tableid name to another language.

I.e 

EN-us  : project

Ar, Fr,,,,, blah blah...

 I tried below code let me know what am I doing wrong here.

SysWorkflowTracking tracking = SysWorkflowTracking::construct();

   SysDictTable sitc = new SysDictTable(tracking.parmContextTableId());

           

   Info(strFmt("%1", sitc.label()));

Thanks 

I have the same question (0)
  • GirishS Profile Picture
    27,829 Moderator on at

    Hi waytod365,

    Do you want to get table label present in the WorkflowTrackingStatusTable in specified language?

    Also, ContextTableId will be the field that will be storing the tableId in WorkflowTrackingStatusTable.

    Thanks,

    Girish S.

  • Suggested answer
    Martin Dráb Profile Picture
    238,576 Most Valuable Professional on at

    It seems that you know how to get a label ID, but not how to get the label text in a different language. You can do it with SysLabel::labelId2String2(), for example.

  • waytod365 Profile Picture
    351 on at

    Thanks for your reply Girish,

    Yes! I want to get the label  'DocumentType'

    But, in the WorkflowTrackingStatusTable table list of table name label store to documentType.

    Thanks for your reply Martin sir,

    SysLabel::labelId2String2(DocumentType, 'fr') 

    LabelId2string2 we can only pass labelId.

    Please, give me a example sir.

    Thanks 

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

    You can do something like below.

    WorkflowTrackingStatusTable trackingStatus;
    DictTable dict;
    
    select * from trackingStatus;
    dict = new DictTable(trackingStatus.ContextTableId);
    SysLabel::labelId2String(literalstr(dict.label()), 'AR');

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi Girish,

    It's not working as expected.

    WorkflowTrackingStatusTable trackingStatusTable;

          Trans trans = Trans::find("TUSMF-000001");

           DictTable dict;

           select firstonly trackingStatusTable

               where trackingStatusTable.ContextRecId == trans.RecId

               && trackingStatusTable.ContextTableId == tableNum(Trans);

           dict = new DictTable(trackingStatusTable.ContextTableId);

           Info(strFmt("%1", SysLabel::labelId2String(dict.label(), 'Ar')));

    As i mentioned above code return null.

    Note : Trans table has label : @SYS3820

  • GirishS Profile Picture
    27,829 Moderator on at

    Try using labelId2String2  instead of labelId2String.

    Get the labelId in the variable and then pass the labelId as mentioned in the below blow with "@" symbol.

    Refer to the below blog.

    http://www.fourone.se/blog/2007/11/01/get-label-value-in-different-languages/

    Thanks,

    Girish S.

  • Martin Dráb Profile Picture
    238,576 Most Valuable Professional on at

    waytod365, your code is difficult to read, because you pasted it in a wrong way. Please always use Insert > Code in the rich formatting view.

    Your code doesn't return any value at all, therefore it can't return null either. What do you mean by that. Does it put an empty string to infolog, or throw an exception?

    What did you find when you debugged the code? Is labelId2String() called with the expected value?

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 695 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 360 Super User 2026 Season 1

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans