Saturday, March 6, 2021

Form Menu Button click method to update field by filtering records only in form

 adding menu button to update the filed in table for marked based on filtered records only  


void clicked()

{

   GOD_CashCollection  god_CashCollectionUpdate;

   super();


  ttsBegin;

    for(god_CashCollectionUpdate = getFirstSelection(GOD_CashCollection_ds);god_CashCollectionUpdate;god_CashCollectionUpdate = GOD_CashCollection_ds.getNext())

    {

       //info( god_CashCollectionUpdate.InvoiceId);

        if(god_CashCollectionUpdate.Delivered)

        {

         god_CashCollectionUpdate.selectForUpdate(true);

         god_CashCollectionUpdate.MissingInvoice = NoYes::No;

         god_CashCollectionUpdate.AccountConfirmed = NoYes::Yes;

         god_CashCollectionUpdate.update();

        }

    }

    ttsCommit;

    GOD_CashCollection_ds.research(true);

}





No comments:

Post a Comment