09 April 2021

Looping selected records in the form in D365FO and X++ code to loop form selected records.


When the class main method initiated there can pass the args.record to below method and can loop records.

Reference: Class: PurchReqCancel

private void runLoopCancelWin(Common _common)
    {
        FormDataSource fds            = FormDataUtil::getFormDataSource(_common);
        Common         common;

        for (common = fds.getFirst(1) ? fds.getFirst(1) : fds.cursor(); common; common = fds.getNext())
        {
            this.doCancel(common);
        }
    }








No comments:

Post a Comment

Give me the commetns and solutions

DB restore production DB to DEV environment in D365 FO using Bacpac file

  https://www.linkedin.com/pulse/restore-production-database-dev-environment-d365fo-using-abbas-tfwbe SQLPackage link : https://www.linkedin...