Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Adding automated task to vendor invoice workflow

(0) ShareShare
ReportReport
Posted on by

Hello,

I'd like to add an automated task to the vendor invoice workflow in AX 2012 R3 but when I go to modify my workflow, I don't see my new task as an option to add to the workflow. 

I'm following instructions from here: 

https://docs.microsoft.com/en-us/dynamicsax-2012/developer/how-to-create-a-workflow-automated-task

I've created a new class which implements WorkflowElementExecutionEventHandler.  I've basically duplicated the VendInvoicePolicyTaskEventHandler, changed the name, and added my own little hello world code to the execute method.  

I've created a new automated task under AOT\Workflow\Automated Tasks.  I've basically duplicated the VendInvoicePolicyEvaluationTask, changed the name, and pointed it to my new class.  I've ensured the Document is VendInvoiceDocument, the same as VendInvoicePolicyEvaluationTask which is the document that I'd like to associate my task with.  

I've performed an incremental CIL and tried restarting the AOS.  When I go to edit the workflow, I can see the "Evaluate policy rules for invoices" automated task but mine is not an option to add to the workflow: 

pastedimage1576009004621v1.png

Any ideas why my task is not showing up in the workflow editor?  Is there something obvious that I'm missing?  Any help is greatly appreciated!

  • Greg's Mom Profile Picture
    Greg's Mom on at
    RE: Adding automated task to vendor invoice workflow
    [quote user="Ludwig Reinhard"]

    Hello Brawndo,

    Did you try a full CIL and restarted your machine?

    Can you also let us know what kind of automation you created? (Just interested ;-)

    Best regards,

    Ludwig

    [/quote]

    Thank you for your suggestion, Ludwig.  The automation that I'm creating is as described in my other post from yesterday to validate vendor invoices prior to them going through the approval process: 
    https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/374829/vendor-invoice-validation-before-workflow-approval

    I'm creating an automated task to perform the vendor invoice validations similar to what occurs during posting in the check method of the PurchInvoiceJournalCreate class.  I'm not 100% sure how I can call this code to just validate the invoice without performing the posting.  This will be my focus today

  • Greg's Mom Profile Picture
    Greg's Mom on at
    RE: Adding automated task to vendor invoice workflow

    Thank you guys.  I had completely missed the point of adding the automated task to the supported elements node under the Workflow\Workflow types node.  Thank you very much for pointing that out.  

  • Verified answer
    kvnkk Profile Picture
    kvnkk 800 on at
    RE: Adding automated task to vendor invoice workflow

    Hi,

    Can you cross check below point. whether you have created or not??

    After an automated task is created, you can add the automated task to a workflow type in the Supported Elements node. 

    Regards,

    KVNKK

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Adding automated task to vendor invoice workflow

    Hello Brawndo,

    Did you try a full CIL and restarted your machine?

    Can you also let us know what kind of automation you created? (Just interested ;-)

    Best regards,

    Ludwig

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans