Tuesday, 8 January 2019

D365 get form Datasource and selected record buffer Event handler

D365 get form Datasource and selected record buffer Event handler

[FormDataSourceEventHandler(formDataSourceStr(Salestable, SalesTableDS), FormDataSourceEventType::Written)] 

public static void SalesTableDS_OnWritten(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun formRun = sender.formRun() as FormRun;
// you can call form methods here
formRun.callMethod();

// Get the selected datasource record from the grid
TableName tableBuffer = sender.cursor();

// Get datasource variable
FormDataSource dsVariable = sender.formRun().dataSource(“TableName”);
}

No comments:

Post a Comment

UX & Personalization: Next-Generation Workspace Experience

  UX & Personalization: Next-Generation Workspace Experience Section Content Title Build Your Dream Workspace: Advanced Personalization ...