How to extract label text.
This code shows how to get the text of a specific label for a specific module, for a specific language.
This might come in handy when constructing a text to be printed on a report, that will more than one label text.
// This code allows you to extract the label text of a specific label, for a specific module,
// for a specific language
//
// Handy when constructing text fields containing many values and labels for printing
//
// str = labeltxt("gls",element.design().languageId(),200);
str labeltxt(str _labelModule,LanguageId _languageId, LabelIdNum _labelNo)
{
Label l;
l = new label(_languageId);
return l.extractString(l.name(_labelModule,_labelNo));
}
This code shows how to get the text of a specific label for a specific module, for a specific language.
This might come in handy when constructing a text to be printed on a report, that will more than one label text.
// This code allows you to extract the label text of a specific label, for a specific module,
// for a specific language
//
// Handy when constructing text fields containing many values and labels for printing
//
// str = labeltxt("gls",element.design().languageId(),200);
str labeltxt(str _labelModule,LanguageId _languageId, LabelIdNum _labelNo)
{
Label l;
l = new label(_languageId);
return l.extractString(l.name(_labelModule,_labelNo));
}
In AX 2012 you can do:
ReplyDeleteSysLabel::labelId2String2(literalStr("@NDI2851"), _jour.LanguageId);