Wednesday, June 16, 2021

Function to check whether DS is exists or not in QUERY D365FO

QueryBuildDataSource findFirstDsForTable(Query _q, TableId _tableId)

{

    QueryBuildDataSource ds;

    int i;

    for (i = 1; i <= _q.dataSourceCount(); i++)

    {

        ds = _q.dataSourceNo(i);

        if (ds.table() == _tableId)

        {

            return ds;

        }

    }

    return null;

}


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