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);
}
}
Previous Post
Next Post

post written by: