Monday, April 14, 2014

Create sales order from sales quotation

Following code is used to create sales order from sales quotation:
static void createSalesOrderFromQuote(Args _args)
{
    SalesQuotationTable             salesQuotationTable = SalesQuotationTable::find("quotation Id");
    SalesQuotationEditLinesForm     editLinesForm;
    ParmId                          parmId;
    
    editLinesForm = SalesQuotationEditLinesForm::construct(DocumentStatus::Confirmation);
    
    parmId = editLinesForm.parmId();
    
    editLinesForm.initParmSalesQuotationTable(salesQuotationTable);    
    editLinesForm.parmTransDate(systemDateGet());
    editLinesForm.prePromptInit();
    editLinesForm.initParameters(NoYes::No, NoYes::No, NoYes::No, NoYes::No, NoYes::No, '', NoYes::No); 
    
    editLinesForm.run();
}

Happy Daxing !!!
Post a Comment