21 November 2021

ED365FO event handler to get current database record

   public static void TRGvalidateHours(FormControl sender, int controlName)

    {

        FormRealControl  control = sender as FormRealControl;

        FormRun     formRun = sender.formRun();

        FormStringControl projIdControl = formRun.design().controlName(formControlStr(TSTimesheetEntry,ProjId));

        

        FormDataSource TSTimeSheetLineWeek_ds  = formRun.dataSource(formDataSourceStr(TSTimesheetEntry,TSTimesheetLineWeek)) as FormDataSource;

        TSTimesheetLineWeek timesheetLineWeek = TSTimeSheetLineWeek_ds.cursor();

        TSTimesheetTable    timeSheetTable = TSTimesheetTable::find(timesheetLineWeek.TimesheetNbr);

        ProjTable           projTable = ProjTable::find(projIdControl.text());

}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...