{"id":1102,"date":"2013-06-23T09:35:59","date_gmt":"2013-06-23T09:35:59","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=1102"},"modified":"2013-06-23T09:35:59","modified_gmt":"2013-06-23T09:35:59","slug":"step-by-step-using-decrementby-in-microsoft-dynamics-crm-2011-workflow","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=1102","title":{"rendered":"Step by Step Using \u201cDecrementBy\u201d in Microsoft Dynamics CRM 2011 Workflow"},"content":{"rendered":"<p>Did you ever get a requirement to decrease your product&#8217;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\u2019s 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.<\/p>\n<p>Step1. Setup a product with some value in Quantity on hand field like below<\/p>\n<p>Step2. Create a workflow to decrement value from Quantity on hand field, navigate to Settings-&gt;Process-&gt;New.<\/p>\n<p>Step3. Select workflow properties (Entity -&gt;Case) and select Ok.<\/p>\n<p>Step4. Select \u201cRecord status changes\u201d option under start when.<\/p>\n<p>Step5. Add a check condition (Navigate to Add Step-&gt;Check Condition) like below and click on Save and Close.<\/p>\n<p><a href=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/checkcondition.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1105 aligncenter\" alt=\"checkcondition\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/checkcondition.png\" width=\"418\" height=\"48\" \/><\/a><\/p>\n<p>Step6. Add a step to update product entity and click on Set Properties.<\/p>\n<p>Step7. Select Quantity On Hand field and perform steps in sequence like below screen.<\/p>\n<p><a href=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/steps.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1104 aligncenter\" alt=\"steps\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/steps.png\" width=\"500\" height=\"250\" \/><\/a><\/p>\n<p>After this your workflow designer should look like below<\/p>\n<p><a href=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/workflowdesigner.png\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-1103 aligncenter\" alt=\"workflowdesigner\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2013\/06\/workflowdesigner.png\" width=\"500\" height=\"89\" \/><\/a><\/p>\n<p>Step8. Activate your workflow and close it.<\/p>\n<p>Once you will resolve a case which has product associated with it, it will decrement value 1 from quantity on hand field.<\/p>\n<p><b><a href=\"http:\/\/himbap.com\/\" target=\"_blank\">HIMBAP<\/a> | Need any help in customization <a href=\"http:\/\/www.himbap.com\/contactus.aspx\">Contact US !!<\/a><\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever get a requirement to decrease your product&#8217;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\u2019s say we are using case entity and when a case is resolved we need to decrement&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=1102\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,19],"tags":[61,206],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1102"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1102"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1102\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}