Showing posts with label Long Processing Dialog D365FO. Show all posts
Showing posts with label Long Processing Dialog D365FO. Show all posts

Long Processing Dialog D365FO



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 


  • Class / Table name 
  • Method Name
  • Container
  • Caption Message
  • Completion Message
  • Failure Message 

Form Code

 [Form]
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
            ///
        }

    }

}






Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...