The Infolog

A blog of Dynamics AX development tips and tricks

Skip to: Content | Sidebar | Footer

Saving and merging Infolog items for later use

29 September, 2013 (15:38) | Uncategorized | By: Howard Webb

The job below that will get Infolog items, clear them and save each one for later use. This can be of use when you need to record the Infolog for later viewing

static
void Job1(Args _args)

{

container errors;

container t;

int i;

int length;

;

 

warning(“Test1”);

error(“Test2”);

errors = conIns(errors, 1, t);

 
 

info(“extra”);

 
 

t = infolog.cut();

 
 

errors = conIns(errors, 2, t);

length = conLen(errors);

 
 

for( i =1; i <= length; i++)

{

t = conPeek(errors, i);

infolog.import(t);

}

 
 

}

Print Friendly

Write a comment