Hi,
I have an issue with the workflows that have me confused and I cannot seem to find any solution for this issue. The scenario is as follows;
We have 1 workflow that is setup under sales, MS-SOAPW where we have set certain criteria for this workflow. It is a custom field on our Sales Order for Gross Profit percent, and if the GP% on the order falls below 33% it triggers this workflow. This works just fine. But then doesnt trigger any other workflow if other criteria fail.
Example: Workflow MS-SOAPW-02 is for the Gross Profit <33% send for approval.
Workflow MS-SOCLAPW-01 for Sales Orders when the Customer has exceeded their Credit Limit.
We create a Sales Order that is below our Gross Profit percentage as well as over the credit limit. The Gross Profit workflow is triggered, they then approve the order, the order is released instead of triggering the Credit Limit workflow afterwards. Now the Order is released, the warehouse pick the product and ship, even though the customer is over is credit limit.
Is there a way to get past this or to have one workflow trigger another? I am not a developer so please respond as a consultant. If development is needed, I will have our developer figure out your possible solutions.
I did try combine both workflows into one, but that failed.
Thanks in advance
Malcolm
0
Answers
what version are you using?
For NAV 2018 there was a fix for "The workflow sequence does not trigger correctly." (Maybe that is the problem)
See here: https://support.microsoft.com/en-us/help/4518533/cumulative-update-21-for-microsoft-dynamics-nav-2018-build-35815
Thank you
Please can someone assist or point me in the right direction?
Thanks,
Malcolm
If we take your example:
You create a Sales Order -> Trigger for Gross Profit is executed -> Approval is approved.
So now, you could create a Workflow for the Approval. For example:
last Approval is approved -> Check if customer credit limit is exceeded
if limit is exceeded -> do something
if limit is not exceeded -> set the status to released
Maybe you can send a screenshot of the workflow you are using. So i can rebuild it
Thank you for your response. What should happen is that the workflow should check to see if the GP is over their limit, if so then go for approval, if not, then do nothing, and then it should trigger the credit limit workflow. If that fails, send it for approval, if it passes, do nothing.
The person that approves for the first GP workflow is different to the person that approves for credit limit approvals, this is why I have 2 approvals setup. I think the issue is that my GP workflow states, when approved, release the document, which it should rather trigger another workflow, but I have no idea how to do that as I am not a developer and it seems my developers are struggling to figure this out.
Attached is a screen shot my two workflows.
Thanks
Malcolm
the following should work. You need maybe modify it a bit.
The "A customer credit limit is execeded". Looks like:
I inserted here a User Group, for the approval.
You can add a few more lines for your requirements. (Multiple approver, Approval is rejected)
You need to set a Table Releation in the setup. (Workflow - Table Relations), that should work:
Regards,
Malcolm
-> https://pastebin.com/7GjqDEHL
You just need to copy the Paste Data and paste it into the texteditor and save it as ".xml". After that you should be able to import it, with the available Import function.
I have mine setup very similar to yours, only difference is that I never set mine to an approval group, but a specific approver for both options...but it just doesn't work.
My workflow is attached again. As said the only difference I have is that I did not set a group for the credit limit but a specific approver.
Thanks,
Malcolm
Can you show me the Response of the second line (An approval request is approved.)? There should be a line with "Check if the customer credit limit is exceeded."
If the import is not working, i can write a step by step "guide".
Thank you for all your assistance. I have amended my Response to include the 'Check if Customer credit limit is exceeded', but it still doesn't trigger that workflow for me.
I am at a loss as to what I am getting wrong or where.
I would like to take up your offer for you to send me a step by step guide on how to achieve my aim with these workflows, and at the same time try learn more about combining various workflows, as that seems difficult for sure.
Once again, thank you so much for all your help.
Regards,
Malcolm
i'll will show u a few screenshots with the settings and a short description.
That's the whole Workflow:
You can create a workflow, like you can see in the picture. I showed the "Indent" Column, please check if they are correct.
That are the response, for every Line:
Line1 Response:
Line 2 Response:
Line 3 Response:
Line 4 Response:
Line 5 Response:
Line 6 Response:
Line 7 Reponse:
Line 8 Response:
If you rebuild it like that, it does the following:
Whenever a approval of an Order with the Status open is requested, it starts an Approval process.
When no more approvals are found, it checks for the Customer Credit Limit and starts another Approval Process.
You maybe need to modify the condition for your requirements. (add your Custom Field)
Important: You need to set the Table Relation, in the "Workflow - Table Relations" Table. As already posted in a previous answer.
If you can't select a response, you just have to check the missing option in the "Workflow Event/Response Combinations". (It can be found under Workflow -> Administration - or if you type "Workflow Event/Response Combinations" in the top right search bar)
Thank you so much for all your assistance. It seems to be working now except when I add filters to the 'A customer credit limit is exceeded' That seems to cause the workflow to stop working as expected.
I will discuss with my client to see if we need these filters or if they want to add a group for them to use.
Either way, we seem to be almost there. Once again, thanks for all your assistance.
Regards,
Malcolm
Seems something may still be off and I am unsure again. Before I modified the workflow we had the original GP approval workflow set to a group of 4 users to approve. They are all set as level 1 so any of the 4 could pick up the approval and approve, it would then release the document. Now with the changes, it seems to be forcing all 4 users to approve before it will release the document.
I am not sure where that change is and how to sort that out. I do believe it may have something to do with the 'On Condition' of my approval, but I don't think I changed anything there for the second line, but I may have in all my testing.
Any idea on this?
Regards,
Malcolm
An approval request is approved -> Pending Approvals: 0 and
An approval request is approved -> Pending Approvals: >0
If you have a team with 4 user, with level 1 you need to set it to Pending Approvals: 3.
So the line
An approval request is approved -> Pending Approvals: 0 changes to
An approval request is approved -> Pending Approvals: 3
and the line
An approval request is approved -> Pending Approvals: >0 changes to
An approval request is approved -> Pending Approvals: >3
That should work, because if you have all with the same level, 4 approval requests are generated. As soon as one request is approved, you have 3 left.
Edit: I checked your attachment from a previous post, you didn't even have a Condition in the "An aproval request is approved." line. If you always just need one person to approve the request, you can remove the Condition.
So you just need one line, without an Condition.
Any of the 4 users can approve, and if any of those 4 do, then it should continue. We do not need all 4 users to approve, just 1 of the 4.
I will go back to my original screen shot to see what changed and make that change again, as my customer is now struggling with this as they are locking tables, complaining about all 4 needing to approve and so on.
Let me try sort it out again.
Thanks for all the assistance.
Regards,
Malcolm
then you don't need to check the Pending Approvals.
If we take the screenshot from above.
You can remove the line 5. And remove the Condition of line 2.
The attached screenshot shows the changes to line 2, I removed line 5 and my line 4 has no condition.
Regards,
Malcolm
that's working as long as you need only one person to approve.
We seem to be getting closer, but something is still not right. I have setup my workflow as per your example, and all seems OK on the surface. I send the approval for the order and it goes to the group of 4 users. Any of those 4 can pick up the approval as it failed the GP %. One of the 4 users then approves, and it sends to the next group for the credit limit issues as the customer has exceeded his limit. All seems good, but it also released the document rather than sending it back to 'Pending Approval'.
I tried to remove the 'release document' response in line 2;
but that didn't allow the workflow to move forward, so added it back.
Thanks
Malcolm
To the second line you should add "Approve the approval request for the record."
2nd line:
If that doesn't work for you, please take a screenshot, or even better use the export function and upload it somewhere.
The changes didnt make a difference. I have exported my workflow and pasted it here for you: https://pastebin.com/UbBNhUKG
Hope you can extract that.
Regards,
Malcolm
Just for clarification, the approval request for the customer credit limit is created but the document status is changed to released? (You may want to check the Approval Entries)
Yes, correct, the approvals are created as expected, but the document is released before it should be.
Sales Order status:
Approvals as follows:
GP Approval group can be either Babalwa or Victor in my test:
Customer Credit Limit group can be either Tharina, Brenda or Malcolm
Aproval entries:
You can see that the GP approval was done by Victor, which automatically set the status to approved for Babalwa as well, and then Victor sent the credit limit approval automatically to Tharina, Brenda and Malcolm. They are sitting as open, but the Sales Order is released.
Regards,
Malcolm
do you have an additional Workflow running, or do you have some modification, so that you can't change the status to "Approval pending" when it's once released?
These are the workflows we have running for sales:
There are no modifications around workflows that we have done to stop a status change. We did setup all the Sales Order Credit Limit approvals way back and then setup the one you have been assisting me with, and that is when we realised that the SO Credit Limit workflows were being ignored.
I disabled the SO Credit limit workflows and still get the same result. I also removed the filters for the line 'A customers credit limit is exceeded' and that didn't change.
Another error is that if the order is within its GP limit, so it should automatically approve but the credit limit has been exceeded, then when you send for approval I get an error 'No approval workflow for this record type is enabled'.
I just cannot understand why it is so difficult to get different types of approvals to trigger for a sales document.
Regards,
Malcolm
I have only enabled the one worklfow, and it's working so far. So it's unfortunately hard to find the problem that you are facing.
The message "No approval workflow for this record type is enabled", should only appear if no Workflow is found with matching conditions.