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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to disabled Delete Records submenu in File menu on Sales table List Page form

(0) ShareShare
ReportReport
Posted on by 207

Hi Experts,

Hope you are doing well

I need to hide the delete reccord button from the file menu on the Sales Table List page. I already set the Allow delete properties "No" in datasource & hide toolbar property to "Yes". But still, it's enable.

pastedimage1600849416930v1.png

Kindly help me to solve this issue.

Thanks in advance, 

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Deepak,

    Do you need this button disabled for all users or only a group of users?

  • DEEPAKNONU Profile Picture
    207 on at

    Thanks, I appriciated for your quick response. For all users i need to hide this button.

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Deepak,

    In that case you can do it in the class SalesTableListPageInteraction.

    Go to method setButtonSell() and set the value for the variable "allowDelete" to false. Do an incremental CIL afterwards.

    This should disable the "Delete" button.

  • DEEPAKNONU Profile Picture
    207 on at

    Gunjan,nothing happens it's the same as before.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Deepak,

    Can you share your code? Also, did you restart the client and test?

  • DEEPAKNONU Profile Picture
    207 on at

    This is my code button sell:-

    private void setButtonSell()

    {

       SalesTableType      salesTableType = this.currentSalesTable().type();

       boolean             allowDelete = salesTableType.checkDelete(false, false);//We cannot show any dialogs from the list page as is also renders on EP.

       boolean             allowUpdate = salesTableType.checkUpdate(false, false);

       FormDataSource      salesTable_ds;

       // <GEERU>

       boolean countryRegion_RU = SysCountryRegionCode::isLegalEntityInCountryRegion([#isoRU]);

       if (countryRegion_RU)

       {

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonCalculateConfirmDates), canConfirmationBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonUpdateConfirmation), canConfirmationBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonProformaConfirmation), canConfirmationBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonProcessEventKanbans), canConfirmationBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonUpdateInvoice4Paym_RU), canInvoice4PaymBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonProformaInvoice4Paym_RU), canInvoice4PaymBeUpdated);

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, Generate), canConfirmationBeUpdated || canInvoice4PaymBeUpdated);

       }

       else

       {

       // </GEERU>

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, Generate), canConfirmationBeUpdated);

       // <GEERU>

       }

       // </GEERU>

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonJournalConfirmation), confirmationJournalExists && !this.currentSalesTable().returnItem());

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, QuotationConfirmationJournal), quotationJournalExists);

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, EditButton),        allowUpdate);

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, EditInGridButton),  allowUpdate);

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, EPEditButton),      allowUpdate);

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, Delete),            allowDelete);

       salesTable_ds = this.currentSalesTable().dataSource();

       if (salesTable_ds)

       {

           salesTable_ds.allowDelete(allowDelete);

       }

       // Calculate group controls

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, MultiLnDisc), !salesTableInteractionHelper.parmInterCompanyPOInvoiceMatched());

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, EndDisc), !salesTableInteractionHelper.parmInterCompanyPOInvoiceMatched());

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, SalesCreditNote), salesTableInteractionHelper.parmCanCreditNoteBeCreated());

       this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, TieredCharges), salesTableInteractionHelper.parmButtonTieredChargesEnabled());

       // <GEERU>

       if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoRU]))

       {

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, buttonJournalInvoice4Paym_RU), invoice4PaymJournalExists);

       }

       // </GEERU>

       if (isConfigurationkeyEnabled(configurationKeyNum(Retail)))

       {

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTableListPage, MenuItemSalesPrepayment), this.currentSalesTable().SalesStatus != SalesStatus::Invoiced);

           // disable multiline and total discount buttons for Retail orders

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTable, MultiLnDisc), !salesTableInteractionHelper.parmIsRetailOrder());

           this.listPage().actionPaneControlEnabled(formControlStr(SalesTable, EndDisc), !salesTableInteractionHelper.parmIsRetailOrder());

       }

    }

    And I restart the service also . Is there any way to hide the file full toolbar on the sales table listpage. 

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    You have to change this statement -

    boolean             allowDelete = salesTableType.checkDelete(false, false);//We cannot show any dialogs from the list page as is also renders on EP

    to this 

    boolean             allowDelete = false;

    By hide the entire toolbar, you want to hide the entire action pane?

  • DEEPAKNONU Profile Picture
    207 on at

    Thanks Gunjan, but it disables from action pane also. And I need to hide toolBar means file tab not action pane.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Deepak,

    If you made only the change that I gave you, it should disable the delete button only. If you want to disable the Sell tab, you can add another line of code here to disable the tab as well.

    Please check if there are any other changes if the action pane is getting disabled as well.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 653

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 501 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 298

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans