Clicked event of button control in Dynamics 365 for Finance and Operations


[Form]
public class POLInReviewMobileServiceTable extends FormRun
{
    [Control("Button")]
    class UpdateAsRepaired
    {
        /// 
        ///
        /// 
        public void clicked()
        {
            super();

            //Updation of record.
            POLMobileServiceTable polServiceTableUpd = POLMobileServiceTable::find(POLMobileServiceTable.ServiceID, true);

            //assign the values to buffer for updation
            //update the record
            ttsbegin;
            polServiceTableUpd.ServiceStatus = POLServiceStatus::Repaired;
            polServiceTableUpd.update();
            ttscommit;
        
            POLMobileServiceTable_ds.research();

            info ("Record updated.");
        }

    }

}