web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Enable or disable confirm Button in Purchtable form

(0) ShareShare
ReportReport
Posted on by 405

Hi,

I want to disable confirm button in PurchTable Form, I have written below code but it's not working anyone suggests me how to disable button 

[ExtensionOf(classStr(PurchTableInteraction))]
Final class PurchTableInteraction_Extension
{
protected void enableHeaderUpdateJournalActions()
{
next enableHeaderUpdateJournalActions();
page = this.page();
purchTable = page.activeRecord(identifierStr(PurchTable));
if(PurchParameters.Test_DisableButton)
{
page.actionPaneControlEnabled(formControlStr(PurchTable, buttonConfirmationRequest),true);
page.actionPaneControlEnabled(formControlStr(PurchTable, buttonConfirm), true);
}
}

}

Thanks in advance.

I have the same question (0)
  • Martina123 Profile Picture
    on at
    RE: Enable or disable confirm Button in Purchtable form

    Yes. This change will stop users from confirmation on Purchase order list page and Purchase Order details form

  • Mea_ Profile Picture
    60,284 on at
    RE: Enable or disable confirm Button in Purchtable form

    What does it mean ? We have all code available to us and it either affects or does not affect.  Are you saying that this change will stop users from PO confirmation on other forms ? 

  • Verified answer
    Martina123 Profile Picture
    on at
    RE: Enable or disable confirm Button in Purchtable form

    Hi Ievgen,

    The code in interaction class may  impact the behavior of detail form as well as list page.

  • Mea_ Profile Picture
    60,284 on at
    RE: Enable or disable confirm Button in Purchtable form

    But what is the point ? IF you disable it only on the list page, user can go to details and confirm it there...

  • Verified answer
    Martina123 Profile Picture
    on at
    RE: Enable or disable confirm Button in Purchtable form

    Hi Shubham, the 2nd parameter of actionPaneControlEnabled method should be false instead of true, right? It should be:

    page.actionPaneControlEnabled(formControlStr(PurchTable, buttonConfirmationRequest),false);

    page.actionPaneControlEnabled(formControlStr(PurchTable, buttonConfirm), false);

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at
    RE: Enable or disable confirm Button in Purchtable form

    IF you want to disable it everywhere, try to wrap PurchTableType.canConfirmationRequestBeUpdated() or canAnyConfirmationRequestBeUpdated() methods

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Enable or disable confirm Button in Purchtable form

    Try ButtonName.enabled(true/false) to enable/disable buttons.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,352

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 830 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 634 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans