Below is the code snippent for "onActivated" event handler- - Microsoft Dynamics 365 Vietnam

Microsoft Dynamics 365 Vietnam

Song Nghia - Microsoft Dynamics 365 Vietnam

Breaking

Monday, March 25, 2019

Below is the code snippent for "onActivated" event handler-

FormDataSourceEventType::Activated)]
public static void ProjTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
     ProjTable projTable = sender.cursor();   /
     FormDataSource projTable_ds = sender.formRun().dataSource("ProjTable");
     FormRun element = sender.formRun();
     FormControl costOpportionToSubProject = element.design(0).controlName("Apportionment");            
     //Appointment is the newly added button

if(ProjTable.Type == ProjType::FixedPrice)
{
costOpportionToSubProject.enabled(true);
}
else
{
costOpportionToSubProject.enabled(false);
}
}

No comments:

Post a Comment