SalesQuoteToOrder.GetSalesOrderHeader(SalesHeader2);fills in the 'SalesHeader2'.
SalesQuoteToOrder.RUN(Rec); SalesQuoteToOrder.GetSalesOrderHeader(SalesHeader2); //Purpose : Make use of the SalesHeader Number set in SalesHeader2 and do some processing. retVal := saurabh.doProcessing(Rec, SalesHeader2); IF (retVal = 0) THEN //Processing success BEGIN COMMIT; MESSAGE(Text001,"No.",SalesHeader2."No."); END ELSE //Processing Failed BEGIN //The ERROR('') will quietly rollback the data changes, //and the ASSERTERROR will capture the error, allowing the code execution to continue. ASSERTERROR ERROR(''); MESSAGE(Text002,"No.",SalesHeader2."No."); END;
SalesQuoteToOrder.RUN(Rec);