Did you ever get a requirement to decrease your product’s quantity on hand value by 1 using OOB workflow ? We found one post in Microsoft Development Forum and thought of writing this blog post so that it can help other CRM folks. Let’s say we are using case entity and when a case is resolved we need to decrement value 1 from quantity on hand field in associated product, you can follow below step by step instruction to implement this requirement.
Step1. Setup a product with some value in Quantity on hand field like below
Step2. Create a workflow to decrement value from Quantity on hand field, navigate to Settings->Process->New.
Step3. Select workflow properties (Entity ->Case) and select Ok.
Step4. Select “Record status changes” option under start when.
Step5. Add a check condition (Navigate to Add Step->Check Condition) like below and click on Save and Close.
Step6. Add a step to update product entity and click on Set Properties.
Step7. Select Quantity On Hand field and perform steps in sequence like below screen.
After this your workflow designer should look like below
Step8. Activate your workflow and close it.
Once you will resolve a case which has product associated with it, it will decrement value 1 from quantity on hand field.