Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Tuesday, April 12, 2022

Iterate the Error/ info log using Enumerator in AX 2012/ D365 F&O

Hi,


 SysInfologEnumerator sysInfologEnumerator;

    SysInfologMessageStruct sysInfologMessageStruct;

    Exception exception;

    checkFailed("Warning Msg");

    error("Error MSG");

    info("Info Msg");

    sysInfologEnumerator = SysInfologEnumerator::newData(infolog.cut());

    

    while (sysInfologEnumerator.moveNext())

    {

    sysInfologMessageStruct = new SysInfologMessageStruct(sysInfologEnumerator.currentMessage());

    exception = sysInfologEnumerator.currentException();

    info(strFmt("Msg type: %1; Message: %2",

        exception,

        sysInfologMessageStruct.message()));

    } 


Regards,

MAI

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...