GET FORMRUN FROM FORMDATASOURCE IN D365
Get FormRun from form datasource
[FormDataSourceEventHandler(formDataSourceStr(MyForm, MyRandomTableDS), FormDataSourceEventType::Written)]
public static void MyRandomTableDS_OnWritten(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun formRun = sender.formRun() as FormRun;
// you can even call custom methods (I think IntelliSense won't work though)
formRun.myCustomMethod();
}
No comments:
Post a Comment