Search This Blog

Monday, September 19, 2011

Excute Query using X++

static void krishh_RunQueryFormusingCode(Args _args)
{
    QueryRun    SalesQuotationUpdate;
    SalesQuotationTable SalesQuotationTable;
    ;
    SalesQuotationUpdate = new QueryRun(QueryStr(SalesQuotationUpdate));
    if (SalesQuotationUpdate.prompt())
    {
        while (SalesQuotationUpdate.next())
        {
            if (SalesQuotationUpdate.changed(tablenum(SalesQuotationTable)))
            {
                SalesQuotationTable = SalesQuotationUpdate.get(
                    tablenum(SalesQuotationTable));
                info(SalesQuotationTable.QuotationId);
            }
        }
    }
}

No comments:

Post a Comment

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.