I have created a custom field Contact on SO screen (SO301000). Now I need to populate these field when user Create Sales Order from Opportunity screen (CR304000). New custom fie
Similar answer found here: How to pass line item custom field value to sales order from opportunity?
Can be translated to something like this from CROpportunity to SOOrder...
public class CROpportunityMaintExtension : PXGraphExtension<OpportunityMaint>
{
[PXOverride]
public virtual void DoCreateSalesOrder(Action del)
{
PXGraph.InstanceCreated.AddHandler<SOOrderEntry>(graph =>
{
graph.RowInserting.AddHandler<SOOrder>((cache, args) =>
{
var soOrder = (SOOrder)args.Row;
CROpportunity opportunity = PXResult<CROpportunity>.Current;
// Copy logic here...
});
});
del();
}
}