Friday, January 24, 2014

From Date to Todate filter

// From Date to TOdate filter
void clicked()
{
    SalesTablesReport salesTablesReport;
    TempSalesRep    tempSalesRepins;

    //delete_from tempSalesRepins;
//    info(strFmt("%1",fromdate.dateValue()));
    delete_from TempSalesRep;
     while select salesTablesReport where salesTablesReport.FromDate >= (fromdate.dateValue())
                                      && salesTablesReport.ToDate <=(todate.dateValue())
    {
        tempSalesRepins.CustAccount = salesTablesReport.CustAccount;
        tempSalesRepins.FromDate = salesTablesReport.FromDate;
        tempSalesRepins.ToDate = salesTablesReport.ToDate;
        tempSalesRepins.insert();
       // info(strFmt("%1",salesTablesReport.FromDate));
    }
    TempSalesRep_ds.research();
    TempSalesRep_ds.refresh();

}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...