here i have added 4 button in salesQuotationlistpage.
now i need to enable/disable button according status. so i have Extensionof of class
SalesQuotationListPageInteraction and modify setButtonEnabled method by Chain of Command
//list page button enable and diable in listpage interation class
[ExtensionOf(classStr(SalesQuotationListPageInteraction))]
final class SQTableinimathod_Extension
{
protected void setButtonEnabled()
{
SalesQuotationTable SalesQuotationTable;
CustQuotationJour CustQuotationJour;
CustQuotationConfirmJour CustQuotationConfirmJour;
next setButtonEnabled();
SalesQuotationTable SalesQuotationTable1 = this.listPage().activeRecord(queryDataSourceStr(SalesQuotationListPage, SalesQuotationTable));
select CustQuotationJour
where CustQuotationJour.QuotationId == SalesQuotationTable1.QuotationId;
if(CustQuotationJour)
{
this.listPage().actionPaneControlEnabled(formControlStr(SalesQuotationListPage, Aks_QuotationJournals), true);
}
else
{
this.listPage().actionPaneControlEnabled(formControlStr(SalesQuotationListPage, Aks_QuotationJournals), false);
}
if(SalesQuotationTable1.QuotationStatus == SalesQuotationStatus::Confirmed)
{
this.listPage().actionPaneControlEnabled(formControlStr(SalesQuotationListPage, Aks_ConfirmationJournal), true);
}
else
{
this.listPage().actionPaneControlEnabled(formControlStr(SalesQuotationListPage, Aks_ConfirmationJournal), false);
}
}
Comments
Post a Comment