Microsoft Dataverse - Learn how to effectively manage your sales order by utilizing this template designed for fulfilling sales orders as either partial or complete

Microsoft Dataverse - A Template to Fulfilled Sales Order as PARTIAL or COMPLETE

Learn how to effectively manage your sales order by utilizing this template, designed for fulfilling sales orders as either partial or complete. By leveraging this template, you can accurately handle the fulfillment of your sales orders.

Use the following steps to copy and paste the below template into the COZYROC JavaScript Task/Component.

1 - Drag and Drop the COZYROC JavaScript Task into the Control Flow canvas or the COZYROC JavaScript Component into the Data Flow canvas. Select REST Web Service Request Task from the drop-down list for the option Choose a pre-built script and click on the OK button, as shown in the below screen capture:


2 - Copy the below parameterization template code:

Fulfillment of sales order as Complete
  1. <?xml version="1.0" encoding="utf-16"?>
  2. <Parameters>
  3. <RestConnection>Dataverse</RestConnection>
  4. <Method>POST</Method>
  5. <Url>/salesorders/Microsoft.Dynamics.CRM.FulfillSalesOrder</Url>
  6. <ContentType>application/json</ContentType>
  7. <IsBodyFile>False</IsBodyFile>
  8. <Body>
  9. <![CDATA[{
  10.   "OrderClose": {
  11.     "@odata.type": "#Microsoft.Dynamics.CRM.orderclose",
  12.     "salesorderid@odata.bind": "/salesorders([salesorderId])",
  13.     "description": null,
  14.     "ownerid_orderclose@odata.bind": "/systemusers([ownerId]])",
  15.     "statecode":"3"
  16.   },
  17.   "Status": 100001
  18. }]]>
  19. </Body>
  20. </Parameters>
Fulfillment of sales order as Partial
  1. <?xml version="1.0" encoding="utf-16"?>
  2. <Parameters>
  3. <RestConnection>Dataverse</RestConnection>
  4. <Method>POST</Method>
  5. <Url>/salesorders/Microsoft.Dynamics.CRM.FulfillSalesOrder</Url>
  6. <ContentType>application/json</ContentType>
  7. <IsBodyFile>False</IsBodyFile>
  8. <Body>
  9. <![CDATA[{
  10.   "OrderClose": {
  11.     "@odata.type": "#Microsoft.Dynamics.CRM.orderclose",
  12.     "salesorderid@odata.bind": "/salesorders([salesorderId])",
  13.     "description": null,
  14.     "ownerid_orderclose@odata.bind": "/systemusers([ownerId]])",
  15.     "statecode":"3"
  16.   },
  17.   "Status": 100002
  18. }]]>
  19. </Body>
  20. </Parameters>
And then click on the Paste button in the COZYROC JavaScript Task/Component, as shown in the below screen capture:


Note: Make sure that the parameter Method is set to POST


    Book a Presales Call

     

    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now.