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

AZURE INTERVIEW QUESTIONS AND ANSWERS

AZURE INTERVIEW QUESTIONS AND ANSWERES 2021 2. What is cloud computing? Explanation:  It is the use of servers on the internet to “store...