Showing posts with label How to get Sales Quotation Confirmed and Sales order Invoiced Details through code in ax 2012. Show all posts
Showing posts with label How to get Sales Quotation Confirmed and Sales order Invoiced Details through code in ax 2012. Show all posts

Wednesday, 17 February 2016

X++ Code for Sales order Invoiced which are Created through Sales Quotation Confirmed

static void Raj_SQTConfirmSTInvoiced(Args _args)
{
    SalesQuotationTable sqt;
    SalesQuotationLine  sql;
    SalesTable          st;
    ;
   while select QuotationId,salesidref,quotationstatus from sqt  join sql
        where sqt.QuotationId == sql.QuotationId
         && sqt.QuotationStatus == SalesQuotationStatus::Confirmed
         join st where sqt.SalesIdRef == st.SalesId
          && st.SalesStatus == SalesStatus::Invoiced
    {
        info(strFmt("%1 is quotationid confirmed,%2 is salesid invoiced",sqt.QuotationId, st.SalesId));
    }
}