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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...