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)

how to resubmit task event handler for customized workflow AX 2012

(0) ShareShare
ReportReport
Posted on by 10,280

after i clicked on change requested from Actions,it sent to the one who wants to start the workflow,after i click on resubmit,no changes happen .so i need to know how to implement this event by coding

Plz anybody help urgently??

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    Typically, the class and methods for a workflow element event handler are created by the Workflow wizard, when you create a new workflow approval or workflow task. You just need to supply the code for each event

    msdn.microsoft.com/.../cc623606.aspx

    Hope it will help

  • Codehunter Profile Picture
    10,280 on at

    plz send me the code for the resubmit task event handler

  • Bashir Ahmad Profile Picture
    5,248 on at

    It is relatively easy to tap into the WorkflowTrackingTable’s (Table) saveTracking Method and kick off some custom action using the record ‘trackingTable’. The trackingTable record contains a useful field  called TrackingType (enum WorkflowTrackingType) which can provide you with more informations as to what has just occurred. E.g. WorkflowTrackingType::Delegate, WorkflowTrackingType::EscalationPath, WorkflowTrackingType::Creation. Using this you can then perform whatever action you would like to do e.g.

    if (trackingTable.TrackingContext == WorkflowTrackingContext::WorkItem)
    {
      if (trackingTable.TrackingType == WorkflowTrackingType::Creation)
      {
            doAction(trackingTable.User); //this is the user to whom the workitem has finally been assigned 
      }
      else if ((trackinTable.TrackingType == WorkflowTrackingType::Delegation) || (trackingTable.TrackingType == WorkflowTrackingType::EscalationPath))
      {
           doAction(trackingTable.ToUser); //to whom the workitem is now assigned (delegated/escalated)
      }
    }


    You can achieve your requirement like this example

  • Codehunter Profile Picture
    10,280 on at

    i need to resubmit task event handler from scratch plz

  • Codehunter Profile Picture
    10,280 on at

    I just only need to fire main() method of resubmit event handler;how can I do that??

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

    Hi Codehunter,

    For resubmit, you need to create a new action menu item which will be pointing to your workflow document class. Take a look at CustFreeInvoiceResubmit menu item which is pointing to the workflow class CustFreeInvoiceWorkflow. Under this class, check reSubmit method. You need to apply the same logic in your case.

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

    Thanks,

    Baber.

  • Codehunter Profile Picture
    10,280 on at

    Plz I checked but it didn't help me btw

    Can you post the code of resubmit event handler plz

  • syed baber Profile Picture
    11,633 on at

    For resubmit event, the main workflow class should be used. Check the method \Classes\CustFreeInvoiceWorkflow\reSubmit. This class should be specified for action menu item of 'Resubmit'.

    Any further queries, let me know.

  • syed baber Profile Picture
    11,633 on at

    Hi Codehunter,

    Do you need any further help or your issue is resolved. Please mark the answer as verified if you got your query answered.

    Thanks,

    Baber.

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