How to access form record using Form control in the event handler in D365 or AX7
[FormControlEventHandler(formControlStr(InventJournalTransfer, Functions), FormControlEventType::Clicked)]
public static void Functions_OnClicked(FormControl sender, FormControlEventArgs e)
{
InventJournalTrans inventJournalTrans;
InventJournalTable journalTable;
FormRun form = sender.formRun();
FormDataSource journalTable_ds = form.dataSource(
formDataSourceStr(InventJournalTransfer,InventJournalTable)) as FormDataSource;
journalTable = journalTable_ds.cursor();
}
[FormControlEventHandler(formControlStr(InventJournalTransfer, Functions), FormControlEventType::Clicked)]
public static void Functions_OnClicked(FormControl sender, FormControlEventArgs e)
{
InventJournalTrans inventJournalTrans;
InventJournalTable journalTable;
FormRun form = sender.formRun();
FormDataSource journalTable_ds = form.dataSource(
formDataSourceStr(InventJournalTransfer,InventJournalTable)) as FormDataSource;
journalTable = journalTable_ds.cursor();
}
No comments:
Post a Comment
Give me the commetns and solutions