We would like to automatically ADD a default Charge Line with Charge Type ‘FREIGHT’ to the Customer Order > Charge tab on Saving the Customer Order Header?
What is the best way to go about this?
I would think it would be a custom event that fires on a new Customer Order record.
BEGIN
&AO.CUSTOMER_ORDER_CHARGE_API.NEW__( :p0 , :p1 , :p2 , :p3 , :p4 );
EXCEPTION
WHEN &AO.Error_SYS.Err_Security_Checkpoint THEN
raise;
WHEN OTHERS THEN
rollback;
raise;
END;
When done manually, you just add FREIGHT and click SAVE but when I looked at the debug there is a lot more going on with the :p3.
CHARGE_TYPEFREIGHTCHARGE_AMOUNT0CHARGE_AMOUNT_INCL_TAX0CHARGECHARGED_QTY1SALES_UNIT_MEASEABASE_CHARGE_AMOUNT0BASE_CHARGE_AMT_INCL_TAX0STATISTICAL_CHARGE_DIFF0COLLECT_DBINVOICETAX_CODE0TAX_CLASS_IDTAX_CALC_STRUCTURE_IDCUSTOMER_TAX_USAGE_TYPEDELIVERY_TYPEGOODSCHARGE_COST0CHARGE_COST_PERCENTINVOICED_QTY0PRINT_CHARGE_TYPE_DBYPRINT_COLLECT_CHARGE_DBNO PRINTINTRASTAT_EXEMPT_DBFALSEUNIT_CHARGE_DBFALSEORDER_NO*1040CONTRACTSITE01COMPANYMYCOMP-LTDCURRENCY_RATE1FETCH_TAX_CODESTRUESET_TAX_FROM_ORIGINALFALSEMULTIPLE_TAX_LINESFALSE |
Thanking you.
Best answer by RutJWhalen
View original