Monday, September 11, 2017

Create Runable class in Dynamics 365 for finance and operations

//Create Runable class in Dynamics 365 for finance and operations

class SSLRunClassTest
{
public static void main(Args _args)
{
Query query;
QueryBuildDataSource qbds;
QueryRun queryRun;
ProjTable projTable;
query = new Query();
qbds = query.addDataSource(tableNum(ProjTable));
qbds.addSortField(fieldNum(ProjTable, Name),SortOrder::Ascending);
qbds.addRange(fieldNum(ProjTable,Type)).value(queryValue(1);
queryRun = new QueryRun(query);
while (queryRun.next())
{
projTable = queryRun.get(tableNum(ProjTable));
info(strFmt("%1, %2, %3",projTable.ProjId,projTable.Name,projTable.Type));
}
}
}

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