Thursday, October 5, 2017

Labels informative finder in AX

static void San_findLabelTextbyID(Args _args)
{
    define.language('en_us')
    define.module('SYS')
    define.Id(451)

    define.labelId('@SYS451')
    define.sysLBlLanguage('en-us')
 
    SysModelElementLabel       sysModelElementLabel ;
    str                         labelText; 

    while select sysModelElementLabel
        where sysModelElementLabel.id == #Id
        && sysModelElementLabel.language == #language
        && sysModelElementLabel.Module == #module
    {
        info(strFmt('Label file:%1, Description: %2',sysModelElementLabel.Module,sysModelElementLabel.Text));
    }

    labelText= (SysLabel::labelId2String(literalStr(#labelId),#sysLBLanguage));

    info(strFmt('Label value: %1, label text: %2',literalStr(#labelId),labelText));

}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...