Create DropShipEntry record via REST API

Hey folks, I’m trying to close a sales order with a dropship line item. To do this I have to create a DropShip Entry record for the line.

Tracelog shows a bunch of steps that follow the UI client experience verbatim. But when it comes down to marking the lines shipped, the tracelog gets very eroneous – repeating calls all over the place apparently unnesc.

Many of us understand that the tracelog does not reveal the need for the beforeImage step (related topic) but even that’s not working correctly.

Before dumping a bunch of code, I thought I’d try to help myself and see if anyone knew what some of these methods do.

After we get down to the final steps, the tracelog makes call in this order:

  • MarkShipmentLines (returns an added PendingDropShipDtl element)
  • GetLegalNumGenOpts (PendingDropShipDtl element still present in return)
  • Update (PendingDropShipDtl element still present in return)

Somewhere before the next call, PendingDropShipDtl is removed from the object and we never see it again. Why/how?

Continuing:

  • GetPendingDtl
  • PostUpdate
  • GetLegalNumGenOpts
  • Update
  • GetPendingDtl
  • PostUpdate
  • GetLegalNumGenOpts
  • Update (pass in DropShipHead.ReceivedShipped = true)

The final Update call is where we are attempting to set “RecievedShipped” to true (similar to the referenced post regarding created a Customer Shipment Entry) but in all tests, we can’t get it to work.

Does anyone know what the purpose of GetLegalNumGenOpts and PostUpdate and all this duplicate method calling is for? Not of the values contained in the elements seem to change.

Is there any other way to garner how to emulate what the client is doing OTHER THAN the tracelogs, which are sorely lacking?

Thanks all!

MarkShipmentLines seems to update the quantities and complete status from all lines.
GetLegalNumGenOpts is usually called so the UI knows if it needs to ask manual information to generate the legal number.
GetPendingDtl goes through open po releases and if quantity is still unreceived it will appear in the Pending PO Lines grid.
PostUpdate will do extra processing for credit card orders and return a message to display on the client with any relevant information.

If there is any specific error or stopper you are facing let me know and I’ll try to check it.

The trick was to call GetByID to get a fresh copy after the MarkShipmentLines() -> Update().

Then we set the ReceivedShipped and did the BeforeImage step and then an Update() worked. :+1: