web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

microsoft dynamics ax Workflow

(0) ShareShare
ReportReport
Posted on by 1,115

Hei

I worked with getting the Workflow to work….but I have a little problem…..

Class:..SalesCrediLimitApprSubmitManager

In the Static Void Main(Args args) at the end there is a code line:

………………….

                             Args.caller().updateworkflowcontrol();

                             }

 

But there is not method with that name on the calling form.

I have been told that I must use a call to the class SysSetupFormRun!!!

But how do I activate/call this method “updateworkflowcontrol” in this class from this main void.

I don't see an instance of the class SysSetupFormRun???

Regards Jan

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,069 Super User 2025 Season 2 on at

    Hi Jan,

    Is this a custom workflow? Maybe you can find some help using these link as it describes something similar: daxapedia.blogspot.ro/.../workflow-in-ms-dynamics-ax-2012.html

  • Suggested answer
    syed baber Profile Picture
    11,633 on at

    Hi Jan,

    You need to call this method when the caller is Submit or Resubmit menu item. Below is an example from free text Invoice workflow class CustFreeInvoiceWorkflow:

    if (_args.menuItemName() == menuitemActionStr(CustFreeInvoiceSubmitToWorkflow) ||

                   _args.menuItemName() == menuitemActionStr(CustFreeInvoiceReSubmit))

           {

               _args.caller().updateWorkflowControls();

           }

    This method is responsible to update the workflow controls like changing the submit button to Actions and shows different options (Approved, Reject, Requestchange and delegate). You just need to call this method in your workflow class inside the main method.

    Please verify and let me know if you have further queries.

    Thanks,

    Baber.

  • Jan_ Profile Picture
    1,115 on at

    Hi

    Yes I understand. But when "args.caller().updateWorkflowControls();" is called it gives me an error:

    Formrun object does not have method: updateWorkFlowControl.

    I don't see why???

    Regards JAN

  • Suggested answer
    syed baber Profile Picture
    11,633 on at

    Hi Jan,

    Can you please confirm if you have specified the following properties on design node of the form for which you are implementing workflow:

    WorkflowEnabled

    WorkflowDatasource

    WorkflowType

    For example, take a look at the design node of CustFreeInvoice form and specify the similar properties for your form.

    Thanks,

    Baber.

  • Jan_ Profile Picture
    1,115 on at

    Hi André

    Yes it is a custom workflow.

    I follow an guide from www.junctionsolutions.com/.../designing-workflow-microsoft-dynamics-ax-2012.

    I notice one differences in the class SalesCreditLimitApprSubmitManager.

    The submit is an void in the class. What I have I my current code is that the submit is done in the Main static method. But the code in the two method Main and Void Submit is exactly the same.

    So what is best??

    • Doing the submit in the main method

    • Doing the submit in the Void Submit

    I must try to call the void submit from main??

    Or maybe the Void Submit is automatic activates somehow?

    Regards jan

  • Verified answer
    syed baber Profile Picture
    11,633 on at

    Hi Jan,

    The best practice is to have separate submit and resubmit methods in your class and you should call these from main method based on the caller menu item. For example, check CustFreeInvoiceWorkflow class and implement your scenario in a similar manner.

    Did the previous issue related to updateWorkflowcontrols method resolve or are you still getting the same error?

    Thanks,

    Baber.

  • Jan_ Profile Picture
    1,115 on at

    Hi

    Yes all of the properties is specified on design-node on both forms

    SalesTable,

    SalesTableListPage

    WorkflowEnabled:        Yes

    WorkflowDatasource:  Salestable

    WorkflowType:            SalesCreditLimitAppr

    Regards Jan

  • Jan_ Profile Picture
    1,115 on at

    Hi

    I still have the same error so....

    I will follow CustFreeInvoiceWorkflow and do it in a similar way.

    I think it is a good tip.

    Thanks.

    Regards Jan

  • Jan_ Profile Picture
    1,115 on at

    Hi Baber
    What I don't see is where I find an or create a method 'updateworflowcontrols'
    that I can use. The call _args.caller().updateWorkFlowControls(); creates an error. The method does not exists.

    Thanks Jan
    Best regards

  • Suggested answer
    syed baber Profile Picture
    11,633 on at

    Hi Jan,

    I am not sure why you are getting this error, as it is not necessary to create this method inside your workflow class. Can you please match all the properties of your form with CustFreeInvoice form and see if there is anything missing?

    Also, if you can send me your project XPO, I can take a look at that and find out what is missing.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans