Long Processing Dialog D365FO
There is a class in Dynamics 365FO Named SysOperationSandbox which is handle long running dialog for long running processes.. this class support Class and table level static method only..
Following are the Parameters
Following are the Parameters
- Class / Table name
- Method Name
- Container
- Caption Message
- Completion Message
- Failure Message
Form Code
public class SLD_DemoForm extends FormRun
{
[Control("Button")]
class FormButtonControl1
{
/// <summary>
///
/// </summary>
public void clicked()
{
container _container=["You can pass
parameter to your method",1000];
SysOperationSandbox::callStaticMethod(classNum(SLD_DemoInstance),
staticMethodStr(SLD_DemoInstance,LongProcess),_container,
'waiting caption should be here', 'Operation completed
message should be here','Operation Cancelled should be here');
super();
}
}
}
Class Code
class SLD_DemoInstance
{
public static void LongProcess(container _container)
{
int contervalue= conPeek(_container,2);
for (int i=1;i <= contervalue;i++)
{
/// Your logic should here
///
}
}
}