I am working on a request to show the Sales Order Number on the Process Shipments screen as a column.
I decided to add some PXDBScalar fields to SOShipment that pulls the last order number from SOOrderShipment. That business logic works for the client and the field appears on the screen properly.
Process Shipments with custom columns show the last sales order for the given shipment.
When the Action selector is changed to Prepare Drop-Ship Invoice, those columns are blank. That’s because a different select statement is run. The view is called Orders but the data is primarily populated from POReceipt instead of SOShipment.
So I tried adding the same custom PXDBScalar fields to POReceipt. And while I can run a GI against POReceipt to correctly show the custom field values:
The custom fields show up in a GI
But the columns on the Process Shipment screen remain blank:
Drop ship receipt records don’t show values in the grid columns
I have SOShipment.UsrLastOrderNbr and POReceipt.UseLastOrderNbr and the column on the screen is looking for a field called UsrLastOrderNbr from the Orders view.
Does it have something to do with the SOInvoiceShipment orders() method? Or the changing of the captions in SOShipmentFilter_RowSelected?
I would just just override the View delegate and populate the virtual field there after calling the base method. Even if it is using a POReceipt select statement it is still returning SOShipment DAC records and with that data it is easy to pull the SOOrderShipment records.
Trying to use attributes across various DACs is going to get dicey in a situation like this.
Wonderful! Thank you, @markusray17 - I appreciate the code! I was working on the override as you suggested but I was making it far more complicated than I needed to. Cheers!
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.