Announcements
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.
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.
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.
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)
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); } }
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
Done
In that I have only one problem ,could not able to open the home page
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 658 Super User 2026 Season 1
André Arnaud de Cal... 632 Super User 2026 Season 1
Giorgio Bonacorsi 570