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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Delete button need to gray out for all user roles except System admin. In All customer forms.

(0) ShareShare
ReportReport
Posted on by 518

Hi All,

Need to remove access delete button from all the roles except system admin.

Please guide which privileges' need to change.D

D365 F&O.

pastedimage1658863602572v1.png

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    HI DNJ,

    Can you explain why no normal business user would have access to delete records from the customers form? Is the requirement to allow creating and update of customers, but not delete them? In that case, you can create new privileges with access for read, update and insert access, but no delete access. I wouldn't recommend to change existing privileges. You can also consider creating a new privilege with DENY permissions for the Delete action.

  • DNJ Profile Picture
    518 on at

    Thanks for the answer ,But i am not able to find out the correct privileges for that button. Do you mind to tell me the correct privileges' for that button? That would be grate help.

    rest of the things i can do but not able to find out the correct privilege.

    Thanks for your help in advance.

  • André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    Hi DNJ,

    This button itself does not have a privilege. It is a system defined button available on the screen. It reacts on the permission which is set on the privilege for the menu item which opens the form.

    The next privileges gives access to this menu item. The "View" version opens the form with read-only access. In that case, the delete button, the new and edit buttons are disabled.

    Maintain customer records (Sales and marketing)

    Maintain customer records (financials)

    View customer records (financials)

  • Seshu Nara Profile Picture
    110 on at

    Hi DNJ,

    Hope this logic helps to fix the issue.

     [FormDataSourceEventHandler(formDataSourceStr(WMSJournalTable, WMSJournalTable), FormDataSourceEventType::SelectionChanged)]
      public static void WMSJournalTable_OnSelectionChanged(FormDataSource sender, FormDataSourceEventArgs e)
      {
          #SysSystemDefinedButtons
    
          JournalPosted posted = NoYes::No;
          FormRun  form   = sender.formRun();
          FormDataSource  wmsJournalTablde_ds = form.dataSource(formDataSourceStr(WMSJournalTable,WMSJournalTable )) as FormDataSource;
          WMSJournalTable wmsJOurnalTable = wmsJournalTablde_ds.cursor();
    
          FormCommandButtonControl deleteButton = form.control(form.controlId(#SystemDefinedDeleteButton)) as FormCommandButtonControl;
    
          //condition if posted = Yes and not sysadmin
          posted = wmsJOurnalTable.posted;
    
          if(posted && !Global::isSystemAdministrator())
          {
              deleteButton.enabled(false);
          }
          else
          {
              deleteButton.enabled(true);
          }
      }

  • Ankit Life Profile Picture
    687 on at

    Hi DNJ,

    Try this -

    Create a new role - In the References to to Table - add CustTable there - double click on custtable - and deny delete.

    Assign this new role to users having customer master access.

    Kindly test before

    Regards,

    Ankit Arora

  • DNJ Profile Picture
    518 on at

    Done

  • DNJ Profile Picture
    518 on at

    In that I have only one problem ,could not able to open the home page

  • André Arnaud de Calavon Profile Picture
    305,624 Super User 2026 Season 1 on at

    Hi DNJ,

    Can you explain what you mean with 'could not able to open the home page'?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 658 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

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

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 570

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans