Get log screen D365 FO

Get log screen D365 FO
Song Nghia - Technical Consultant


private str getLogScreen()
    {
        SysInfologEnumerator    sysInfologEnumerator;
        SysInfologMessageStruct infoMessageStruct;
        ErrorMsg                logMessage;
        str                     logString;
        int                     i;
        #Define.NewLine('\n')
    
        sysInfologEnumerator = SysInfologEnumerator::newData(infolog.infologData());
    
        while (sysInfologEnumerator.moveNext())
        {
            i = 1;
            infoMessageStruct = SysInfologMessageStruct::construct(sysInfologEnumerator.currentMessage());
            while (i <= infoMessageStruct.prefixDepth())
            {
                logString = logString + infoMessageStruct.preFixTextElement(i) + '. ';
                i++;
            }
            logString = logString + " " + infoMessageStruct.message();
        }
        infolog.clear();
        return logString;
    }
Previous Post
Next Post

post written by: