[FormDataSourceEventHandler(formDataSourceStr(SalesCreateQuotation, SalesQuotationTable), FormDataSourceEventType::Activated)]
public static void SalesQuotationTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun form = sender.formRun();
FormDataSource SalesQuotationTable_ds = form.dataSource(formDataSourceStr(SalesCreateQuotation , SalesQuotationTable)) as FormDataSource;
SalesQuotationTable salesQuotationTable = SalesQuotationTable_ds.cursor();
FormControl createRetailCustbtn = form.design(0).controlName(formcontrolStr(SalesCreateQuotation, DTCreateCustQuotation));
FormComboBoxControl accountType = form.design().controlName(formcontrolStr(SalesCreateQuotation, AccountType));
if(accountType.selection() == smmQuotationAccountType::BusRelAccount)
{
createRetailCustbtn.enabled(false);
}
else if(accountType.selection() == smmQuotationAccountType::CustAccount)
{
createRetailCustbtn.enabled(true);
}
}
void init()
{
next init();
this.setFieldsActive();
}
public void setFieldsActive()
{
next setFieldsActive();
DTCreateRetailCustQuotation.enabled(!prospect);
}
public void setFieldsActive()
{
//#define.BTNNAME('DTCreateCustQuotation')
FormControl createRetailCustbtn = this.design(0).controlName(formcontrolStr(SalesCreateQuotation,DTCreateCustQuotation)) as FormControl;
FormComboBoxControl accountType = this.design().controlName(formcontrolStr(SalesCreateQuotation, AccountType)) as FormComboBoxControl ;
if(accountType.selection() == 0)
{
createRetailCustbtn.enabled(false);
}
else if(accountType.selection() == 1)
{
createRetailCustbtn.enabled(true);
}
next setFieldsActive();
}
void init()
{
next init();
this.setFieldsActive();
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156