/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(VendTable, DIPL_VendorBlocking), FormControlEventType::Modified)]
public static void DIPL_VendorBlocking(FormControl sender, FormControlEventArgs e)
{
FormCheckBoxControl callerButton = sender as FormCheckBoxControl ; //Retrieves the button that we're reacting to
FormRun element = callerButton.formRun();
if(callerButton.checked())
{
VendTable vendTable = sender.formRun.datasource(1).cursor(); // this will read the current record from the table.
vendTable.Blocked = custVendorBlocked::ALL; // updating table field.
}
}
Helpfull reference :
https://shyamkannadasan.blogspot.in/2017/04/form-control-event-handler-methods-in.html
https://community.dynamics.com/ax/b/365operationswithsukrut/archive/2018/01/15/customizing-d365-with-event-handlers
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(VendTable, DIPL_VendorBlocking), FormControlEventType::Modified)]
public static void DIPL_VendorBlocking(FormControl sender, FormControlEventArgs e)
{
FormCheckBoxControl callerButton = sender as FormCheckBoxControl ; //Retrieves the button that we're reacting to
FormRun element = callerButton.formRun();
if(callerButton.checked())
{
VendTable vendTable = sender.formRun.datasource(1).cursor(); // this will read the current record from the table.
vendTable.Blocked = custVendorBlocked::ALL; // updating table field.
}
}
Helpfull reference :
https://shyamkannadasan.blogspot.in/2017/04/form-control-event-handler-methods-in.html
https://community.dynamics.com/ax/b/365operationswithsukrut/archive/2018/01/15/customizing-d365-with-event-handlers
No comments:
Post a Comment