Monday, August 5, 2024

Multi selection

My requirement is to move multiple records from one grid to another grid by using the clicked method.


public void clicked()

        {

            super();

            SECURITYROLE            sECURITYROLELoc = SECURITYROLE_Ds.cursor();

            vendgroup               vendgrouploc;

            vendgroup               vendorgroup;

            ynv_xdscustomization    xdscustomization;

            int                     recordsCount;

 

            recordsCount = vendgroup_ds.recordsMarked().lastIndex();  // Total number of marked records.

            vendgrouploc    = vendgroup_ds.getFirst(1);

 

            while (vendgrouploc)

            {

                ttsbegin;

                xdscustomization.vendgroup      = vendgrouploc.vendgroup;

                xdscustomization.name           = vendgrouploc.name;

                xdscustomization.securityname   = securityroleloc.name;

                xdscustomization.insert();

                ttscommit;

                vendgrouploc = vendgroup_ds.getNext();

            }

        }

No comments:

Post a Comment

Automating Consolidate Account Updates for New Voucher Transactions in D365 Finance and Operations

  Ensure the  Consolidate Account  field is automatically updated for all new voucher transactions based on the  Consolidate MainAccount set...