Monday, March 18, 2019

Get selected Query Range in X++ Dynamics 365 finance and operation

        Query                  query;
        QueryBuildDataSource   qbds;
        QueryBuildRange      qbr;
        int i,j;
        int                   countDS, countRange;
        query              = New Query(queryStr(CustBalanceList));
        countDS           = query.dataSourceCount();

        for(i =1; i<= countDS; i++)
        {
            qbds = query.dataSourceNo(i);
            countRange = qbds.rangeCount();
            for(j=1; j<= countRange;j++)
            {
                qbr =  qbds.range(j);
                info(strFmt("Datasource: %3, field: %1, values: %2", qbr.fieldName(), qbr.value(), qbr.dataSource().name()));
            }
        }

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...