How to get Label Id from a text in Ax 2012
If you want retrieve the Label ID from a specific text description, here the code.
If are present more Label ID for a specific text, you will have the first.
sysLabelEdit sysLabelEdit = New sysLabelEdit();
labelid labelid;
str txt= "Customer account";
str CharsTxt;
CharsTxt = SysLabel::searchStringBuildSpecialCharString(txt);
CharsTxt = SysLabel::seachStringBuildExactStr(CharsTxt);
labelid = sysLabelEdit.findLabel("en-us", CharsTxt);
info ( labelid );
Thank You!
If you want retrieve the Label ID from a specific text description, here the code.
If are present more Label ID for a specific text, you will have the first.
sysLabelEdit sysLabelEdit = New sysLabelEdit();
labelid labelid;
str txt= "Customer account";
str CharsTxt;
CharsTxt = SysLabel::searchStringBuildSpecialCharString(txt);
CharsTxt = SysLabel::seachStringBuildExactStr(CharsTxt);
labelid = sysLabelEdit.findLabel("en-us", CharsTxt);
info ( labelid );
Thank You!
How to find out all labelids of "Customer account"; text
ReplyDelete