I have a customization where when the user hits the 'Create Shipment' button on the Sales Order screen, I need to - on the Shipments screen - set the Description to the Customer (AcctCD) value.
I only want this to happen on the initial creation of the shipment. I've tried the RowInserted event for the SOShipment DAC, but the problem is there is nothing in the e.Row - all the values are null. I don't want to use the RowPersisted event, because that will fire every time a save is executed and I only want this to happen on the first creation of the SOShipment record.
So - my question is, if I want to use the actual 'CreateShipment' process that exists in the Sales Order graph / BLC - which method do I override (there are several - CreateShipment, CreateShipmentIssue, etc.), and how would I go about using that overridden method to set the Description field to the Customer CD?
Thanks...
You can do this overriding the method CreateShipment on SOShipmentEntry graph. Also, to avoid overriding all the function you can actually override the internal function public virtual bool SetShipmentFieldsFromOrder where the order values are populated to the shipment header... there you can set the description to the AcctCD value from the Customer.
Another way to do this avoiding overriding methods is declare the OrderNbr Field Updated event handler on SOShipmentEntry Graph and ask if the record is being created by the Sales Order screen. (Using the property Accessinfo.ScreenID) If the ScreenID from access info is the number from Sales Order (SO301000) you can then assume the record is being created from the Create Shipment button and then set the description as you want.