Skip to main content
Solved

HTTP PUT to Update Drop Ship PO on SO line of Sales Order

  • 11 August 2021
  • 1 reply
  • 440 views

Wondering if anyone has tried the following before:

Step 1) Web service call (REST) to create a Drop Ship Purchase Order

Step. 2) Web service call (REST) to create Sales Order, including Drop Ship PO information at the SO Line level in the PUT request.

 

Has anyone tried to update the PO information on the SO Line via REST API call?

 

Below are my two API calls – first for creating the PO, second for creating the SO.  I am trying to populate the “POOrderNbr” on the Detail record directly (which is essentially what it looks like the PO Link functionality does).  Assuming that the PO Link has some extra logic baked in that allows this field to be written to as needed.

 

Purchase Order API call:

 

{

   "Details":[

      {

         "InventoryId":{

            "value":"ITS-002687"

         },

         "LineNbr":{

            "value":1

         },

         "OrderNbr":{

            "value":"400080001"

         },

         "OrderQty":{

            "value":1.0

         },

         "UOM":{

            "value":"EA"

         },

         "WarehouseId":{

            "value":"100"

         }

      }

   ],

   "Hold":{

      "value":false

   },

   "Location":{

      "VALUE":"MAIN"

   },

   "OrderNbr":{

      "value":"400080001"

   },

   "ShippingInstructions":{

      "ShippingDestinationType":{

         "value":"Customer"

      },

      "ShippingLocation":{

         "value":"MAIN"

      },

      "ShipTo":{

         "value":"640737"

      },

      "ShipToContact":{

         "BusinessName":{

            "value":"JMS TEST 2. 25"

         },

         "Phone1":{

            "value":"123-123-1234"

         }

      }

   },

   "Status":{

      "value":"Awaiting Link"

   },

   "Terms":{

      "value":"03"

   },

   "Type":{

      "Value":"Drop Ship"

   },

   "VendorID":{

      "value":"000115"

   },

   "custom":{

      "CurrentDocument":{

         "DontEmail":{

            "type":"CustomBooleanField",

            "value":true

         },

         "DontPrint":{

            "type":"CustomBooleanField",

            "value":true

         }

      }

   }

}

 

Sales Order API call:

{

   "CustomerID":{

      "value":"640737"

   },

   "Description":{

      "value":"640737 - 4000794"

   },

   "Details":[

      {

         "InventoryID":{

            "value":"ITS-002687"

         },

         "LineNbr":{

            "value":1

         },

         "MarkForPO":{

            "value":true

         },

         "OrderQty":{

            "value":1.0

         },

         "POSource":{

            "value":"Drop-Ship"

         },

         "WarehouseId":{

            "value":"100"

         },

         "custom": {

             "Transactions": {

                 "POOrderNbr": {

                        "type": "CustomStringField",

                        "value": "400080001"

                    }

             }

         }

      }

   ],

   "OrderNbr":{

      "value":"4000800"

   },

   "OrderType":{

      "value":"SO"

   },

}

Best answer by Troy Vars

I know that there are issues when linking these directly into the field thru the ui. ie Just entering the Sales Order or PO number into the reference field does not actually create the necessary links for the system to recognize the PO is Linked to the SO.

You have to use the PO Link to SO action and select from the list of PO’s. I would imagine populating this direct via the API would cause the same issues.

We have a client who has had to back out many PO’s and recreate them due to this issue.

Best bet is to look at the actions POSupplyOK, POSupplyDialogInitializer, LinkSupplyDemand and its associated functions to see if you can extend the endpoint with the necessary fields to create the true link.

View original
Did this topic help you find an answer to your question?

1 reply

Troy Vars
Semi-Pro I
Forum|alt.badge.img+2
  • Semi-Pro I
  • 54 replies
  • Answer
  • August 12, 2021

I know that there are issues when linking these directly into the field thru the ui. ie Just entering the Sales Order or PO number into the reference field does not actually create the necessary links for the system to recognize the PO is Linked to the SO.

You have to use the PO Link to SO action and select from the list of PO’s. I would imagine populating this direct via the API would cause the same issues.

We have a client who has had to back out many PO’s and recreate them due to this issue.

Best bet is to look at the actions POSupplyOK, POSupplyDialogInitializer, LinkSupplyDemand and its associated functions to see if you can extend the endpoint with the necessary fields to create the true link.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings