Enable/Disable & Visibility an Action pane button on a list page using interaction class in D365 | CloudFronts

Enable/Disable & Visibility an Action pane button on a list page using interaction class in D365

Introduction:
In this blog, we will see how we can enable/disable or change the visibility of the form control in interaction class.

Standard behavior of the form, system does not allow us to write code on form which comes under form template -> List page

It Seems like below attached image (Here we will consider form VendTableListPage. Property of form as shown below)










Each ListPage form consisting with an interaction class as shown in property, Here it is VendTableListInteraction. Each interaction class has one override method which is selectionchanged()

Solution: 
Here we will override the method of selectionchanged() as below
[ExtensionOf(classStr(VendTableListPageInteraction))]
final class VendTableListPageInteractionCFSJSClass_Extension
public void selectionChanged()
{
    next selectionChanged();

    //for visibility
    this.listPage().actionPaneControlVisible(formControlStr(VendTableListPage, ), false);

    //for enable/disable
    this.listPage().actionPaneControlEnabled(formControlStr(VendTableListPage, true);
}

For all other ListPage, we can go through interaction class. For reference, go through below mentioned classes:

AgreementListPageInteraction
BankDocumentTableListPageInteraction
CatProcureOrderListPageInteraction
CatVendorCatalogListPageInteraction
CustBillOfExchEndorseListPageInteraction
CustomsExportOrderListPageInteraction
CustPDCListPageInteraction
CustPDCSettleListPageInteraction
CzCustAdvanceInvoiceListPageInteraction
CzVendAdvanceInvoiceListPageInteraction
EcoResCategoryHierarchyPageInteraction
EcoResProductListPageInteraction
EmplAdvTableListPageInteraction
EntAssetObjectCalendarListPageInteraction
EntAssetWorkOrderPurchaseListPageInteraction
EntAssetWorkOrderPurchReqListPageInteraction
EntAssetWorkOrderScheduleListPageInteraction
EPRetailPickingListPageInteraction
EPRetailStockCountListPageInteraction
EximAuthorizationListPageInteraction
EximDEPBListPageInteraction
EximEPCGListPageInteraction
GlobalAddBookListPageInteraction
HcmCourseAttendeeListPageInteraction
HcmWorkerAdvHoldTableListPageInteraction
InventBatchJournalListPageInteraction
InventDimListPageInteractionAdapter
JmgProdStatusListPageInteraction
JmgProjStatusListPageInteraction
PCProductModelListPageInteraction
PMFSeqReqRouteChangesListPageInteraction
ProdBOMVendorListPageInteraction
ProdRouteJobListPageInteraction
ProdTableListPageInteraction
ProjForecastListPageInteraction
ProjInvoiceListPageInteraction
ProjInvoiceProposalListPageInteraction
ProjProjectContractsListPageInteraction
ProjProjectsListPageInteraction
projProjectTransListPageInteraction
ProjUnpostedTransListPageInteraction
PurchCORListPageInteraction
PurchCORRejectsListPageInteraction
PurchLineBackOrderListPageInteraction
PurchReqTableListPageInteraction
PurchRFQCaseTableListPageInteraction
PurchRFQReplyTableListPageInteraction
PurchRFQVendorListPageInteraction_PSN
PurchRFQvendTableListPageInteraction
PurchTableVersionListPageInteraction
ReqTransActionListPageInteraction
ReqTransFuturesListPageInteraction
ReqTransListPageInteraction
RetailOnlineChannelListPageInteraction
RetailSPOnlineStoreListPageInteraction
ReturnTableListPageInteraction
SalesAgreementListPageInteraction
SalesQuotationListPageInteraction
SalesTableListPageInteraction
SysListPageInteractionBase
SysUserRequestListPageInteraction
UserRequestExternalListPageInteraction
UserRequestListPageInteraction
VendEditInvoiceHeaderStagingListPageInteraction
VendNotificationListPageInteraction
VendPackingSlipJourListPageInteraction
VendPDCListPageInteraction
VendPDCSettleListPageInteraction
VendProfileContactListPageInteraction
VendPurchOrderJournalListPageInteraction
VendRequestCategoryListPageInteraction
VendRequestListPageInteraction
VendRequestWorkerListPageInteraction
VendTableListPageInteraction
VendUnrealizedRevListPageInteraction

Thanks for reading !!!


Share Story :

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close