Hi @ramya15,
You can override CreateShipment method in SOOrderEntry graph and add RowPersisting evenhandler to inject the custom value that you need to carry from the SO to Shipment screen.
Following is an example for your reference,
public class SOOrderEntry_Extension : PXGraphExtension<PX.Objects.SO.SOOrderEntry>
{
#region Event Handlers
public delegate IEnumerable CreateShipmentDelegate(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation);
[PXOverride]
public IEnumerable CreateShipment(PXAdapter adapter, Nullable<DateTime> shipDate, Nullable<Int32> siteID, String operation, CreateShipmentDelegate baseMethod)
{
PXGraph.InstanceCreated.AddHandler<SOShipmentEntry>((graphShipmentEntry) =>
{
graphShipmentEntry.RowPersisting.AddHandler<SOShipment>((sender, e) =>
{
SOShipment currentShipment = (SOShipment)e.Row;
SOShipmentExt currentShipmentExt = currentShipment.GetExtension<SOShipmentExt>();
SOOrderExt currentOrderExt = PXCache<SOOrder>.GetExtension<SOOrderExt>(Base.Document.Current);
currentShipmentExt.UsrSubConPoAmt = currentOrderExt.UsrSubConPoAmt;
var files = PXNoteAttribute.GetFileNotes(Base.Document.Cache, Base.Document.Current);
PXNoteAttribute.SetFileNotes(graphShipmentEntry.Document.Cache, graphShipmentEntry.Document.Current, files);
});
});
return baseMethod(adapter, shipDate, siteID, operation);
}
#endregion
}
Good Luck.!