Saturday, October 31, 2015

AX 2012:info Log

The method setPrefix() will help you to group info(), warning() and error() messages with a header. using setPrefix() will make a indentation for your current block of code (everything between { and }). Leaving the code-block will automatically result in going one indentation back.

int i;
int j;
;
setPrefix("custom setPrefix");

for (i=1 ; i<=2 ; i++)
{
setPrefix(strfmt("Prefix %1", i));

for (j=1 ; j<=3 ; j++)
{
info(strfmt("Info %1", j));
}
}

try this on a job

No comments:

Post a Comment

Table browser URL in D365FO

Critical Thinking icon icon by Icons8