Thursday, March 17, 2022

ODATA Request URL D365FO - Testing postman

 POST:

https://<D365FOURL>/data/<EntityPublicCollectionName>

Body:

{
    "dataAreaId""USMF",
    "InvoiceId""USMF00000040",
    "InvoiceAmount"13110.540000,
    "Status""Sent"
}

PATCH:
https://<D365FOURL>/data/<EntityPublicCollectionName>(dataAreaId='USMF',InvoiceId='USMF00000040')?cross-company=true

Body:
{
    "Status""Paid"
}

Friday, March 11, 2022

Getting Infolog container to string in D365FO


        SysInfologEnumerator    sysInfologEnumerator;

        SysInfologMessageStruct infoMessageStruct;

        str                     logMessage;

       container logData = inputLogData;// Input 

        sysInfologEnumerator = SysInfologEnumerator::newData(logData );    

        while (sysInfologEnumerator.moveNext())

        {

            int i = 1;

            if (logMessage)

            {

                logMessage +=  '\n';

            }

            infoMessageStruct = SysInfologMessageStruct::construct(sysInfologEnumerator.currentMessage());        

            while (i <= infoMessageStruct.prefixDepth())

            {

                logMessage += infoMessageStruct.preFixTextElement(i) + '. ';                i++;

            }

            logMessage += infoMessageStruct.message();

        }

      info( logMessage);

Convert Call stack to readable format in D365FO X++

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