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)

AX2012 Purchase order workflow - Rejected logic not working

(0) ShareShare
ReportReport
Posted on by 295

Have been using AX2012 workflows for 3 years successfully  but this issue has me beat!!

Purchase order workflow, want an automated logic step that if the PO value is 0 automatically reject the PO, send a message to the workflow originator, allow them to change the PO and resubmit the order back to workflow.

Solutions we have tried already:-

1. Added a Conditional decision that's says "If PO value is NOT 0" continue with workflow, if PO value is 0 go to Auto reject node

The Auto reject node has Automatic actions setup to always reject the PO

This works fine, if the users create PO with a 0 value, the PO gets rejected, they receive an alert, they can change the PO and re-submit the order to workflow, but when the workflow restarts AX always rejects it automatically?

This trace above shows that the PO was rejected because PO is zero value.

The user added a price and resubmitted, but the Approval resubmitted Auto rejected it again!!!!

2. Have tried using a Approve purchase order and Approve purchase order editable elements, both give same results.

3. Tried using Review purchase order task elements to return the order to the user, but that didn't allow the user to edit the order.

4. Tried using Review purchase order editable task elements to return the order to the user, that allowed the user to edit the order but when submitting the order receive error that orders can only be submitted in Rejected status

Please help, this is causing me sleepless nights!!

Thanks

Anthony

*This post is locked for comments

I have the same question (0)
  • RamK Profile Picture
    2,580 on at

    Can you provide a screen shot of your workflow condition...?

  • JanineAX Profile Picture
    60 on at

    It's just a suggestion but could it be that when it rejects the order based on zero price that it also sets the PO quantity to zero also. Maybe this also needs re-setting?

  • DeadmanWNC Profile Picture
    295 on at

    I did add screen shots last time but they got removed, ... try again

    8304.Untitled.png

    Thanks

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Could you explain why you are using a conditional statement twice to test for the same thing? I'd recommend just having it on your step to auto-reject if the amount is 0. otherwise it will go to whoever you specify under assignee, no need to repeat your logic and risk problems.

  • DeadmanWNC Profile Picture
    295 on at

    Hi Jonathan,
    There are actually a couple of different scenarios at different points in the workflow where we want the PO to auto-reject, so we have two conditional statements that check different data and route to the single "Auto-reject" node. The "Auto-reject" node is assigned to the user Admin and is set to always run.

    Is there a different way to do this?

    Ultimately we want the PO to go back to the user who submitted it and notify them they made a mistake and force them to change the PO

    This is the total workflow screen shot.

    1321.Untitled.png

  • syed baber Profile Picture
    11,633 on at

    Hi DeadmanWNC,

    Have you checked that if PO may be getting rejected from different path, Does not need reapproval -> return order -> came from PR -> Auto reject? What are you checking under "Does not need reapproval" decision box?

    Thanks,

    Baber.

  • Jonathan  Halland Profile Picture
    11,310 on at

    OK, I'm understanding a bit better now. Could you maybe also post a screenshot of the full workflow history of a record in question

  • Suggested answer
    RamK Profile Picture
    2,580 on at

    Hi DeadmanWNC, I noticed that your validation is <> 0, can you please change it to > 0 and test.  Please refer blog post blog.ignify.com/.../purchase-order-approvals-dynamics-ax-2012 which is very close to your requirement

  • Verified answer
    DeadmanWNC Profile Picture
    295 on at

    Fix it!! :-)

    When the user corrected the data on the PO and re-submitted it to workflow, the workflow started at the beginning of the element that caused it to fail and not at the beginning of the workflow. I thought that when a workflow was resubmitted it started from the beginning, where it actually re-starts from where it had got to.

    Thanks for every bodies help

  • Jonathan  Halland Profile Picture
    11,310 on at

    Hi

    This is the reason why I wanted to see your workflow history. Some workflows like PR workflow will actually cancel and restart at the beginning when re-submitting whereas the  PO continues where it left off.

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