Skip to main content

Notifications

Process Indicator in Dynamics Ax 2012

During one of my customization, I have perform a lengthy operation, during this process there is requirement to show process indicator, Code snippets I have found from

https://msdn.microsoft.com/en-us/library/aa841990.aspx

 

For this method I have to create a process helper class and add following snippet its static method

 

static void operationProgress_progressBars(Args _args)

{

#AviFiles

SysOperationProgress progress = new SysOperationProgress();

int i;

 

;

 

progress.setCaption(“File Transfer with Payment entries are in progess…”);

progress.setAnimation(#AviUpdate);

progress.setTotal(50000);

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

{

progress.setText(strfmt(“The value of i is %1″, i));

progress.setCount(i, 1);

}

}

 

 

For testing purpose I add a new form and on its button click, I added from following line code.

 

 

 

 

 

 

 

void clicked()

{

Args arg = new Args();

super();

 

startLengthyOperation();

 

ABCDHelper::operationProgress_progressBars(arg);

sleep(10000);

endLengthyOperation();

 

}

 

This progress operation must be run between two build in functions, that helps to cover the lengthy process in Dynamics Ax 2012.

3-3-2015 1-22-46 PM

Comments

*This post is locked for comments