I have to copy the custom field values from opportunity to sales order while converting the opportunity to sales order. I have come across a sample code to pass custom field from sales order to shipment and I have tried to use the code for overriding the “create sales order” action. The following code snippet I have used in OpportunityMaint extension class
public PXAction action; [PXButton] [PXUIField(DisplayName="Actions",MapEnableRights=PXCacheRights.Select,MapViewRights=PXCacheRights.Select)] protected IEnumerable Action( PXAdapter adapter, [PXIntList(new int[] {1,2,3}, new string[] {"Create Account","Create Sales order","Create Invoice"}),PXInt] int? actionId, [PXString] string ActionName) { if(actionId == 2) { // Implement So Order row insert handler } return Base.Action.Press(adapter); }
The piece of code is not triggering. Looking forward for better solution to implement this option Regards, R.Muralidharan
You will need to override the CreateSalesOrder action. Below is a snippet of code where I had to push the opportunity down to the sales order.