Источник:
http://workflowax.wordpress.com/2012...ocument-field/
==============

I received a query yesterday from a reader asking how one could go about assigning approval work items to different users based on specific fields in the source document. There are a couple of approaches that you could use. The first approach that I will discuss today is ideal to use in the following circumstances.
- You do not wish to perform any development.
- There are not too many combinations available. E.G. Assign all blanket Purchase orders to person X and all the rest to person Y.
If you are using AX 2012, you can do the following:
- Create a new workflow configuration from whichever template you are basing your workflow configuration off.
- Drag and drop a conditional decision node into your workflow configuration to split your workflow into multiple paths.
- Configure your conditional decision by clicking properties. Then setup a condition E.G. Where Ledger Journal Table.Account Type is value Ledger
- Close the conditional decision properties.
- Drag and drop two of your approval/task nodes to the workflow structure.
- Connect the true side of your conditional statement to the one and the false side to the other.
- Configure your approval nodes.
- Double click on the node connected to your True leg of the conditional statement select Step 1, click the assignment button.
- Select “User” under the “Assignment Type” tab.
- Select the User / Users who should be assigned the workitem if your condition is met.
- Setup your workflow messages for the step.
- Return to your workflow canvas and perform step 1-4 for the false leg of your conditional decision, selecting the relevant user to whom the workitem should be sent to if the conditional decision is not met.
- Should you have more than two options, you can chain multiple conditional decisions to either the true or false leg of your original decision.
Here is a short video tutorial for the above making use of AX2012 and the Vendor Disbursement Journal Workflow. I’d recommend watching it in HD.
As an alternate to the above approach, or if you are using AX2009, you can also make use of multiple steps within a single approval. (This example is using AX2012, but a similar path is followed with AX2009)
- Create a workflow configuration with an approval node.
- Double click on your approval node
- Click on Step1, click the Condition button.
- Select the “Run this step only when the following conditions are met.”
- Create a condition.
- Select the Assignment option on the left of your screen.
- Select “User” on Assignment type
- Select the User / Users who should be assigned the workitem if your condition is met.
- Close Step1′s properties.
- Drag and drop a new step from your tool box into the process flow and repeat step 1-9 for each of the conditions required.
- Ensure that all possibilities are met.
Here is a short video tutorial for the above making use of AX2012 and the Vendor Disbursement Journal Workflow I’d recommend watching it in HD.
Источник:
http://workflowax.wordpress.com/2012...ocument-field/