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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...