How to Hide the +New and Delete Action Buttons in Business Central Base Pages
In Business Central, when you open a page (like the Customer List), you usually see a + New button and a Delete action at the top. These allow users to create new records or delete existing ones directly from the list.
However, in many businesses, you may want to restrict users from creating or deleting records. For example, you might allow users to view or edit existing records but not create or remove them.
This can be controlled using the InsertAllowed and DeleteAllowed properties in a page extension.
For Example, we can check in customer list page it's showing +new and Delete button.
Example code:
pageextension 50501 "Customer Card DC" extends "Customer Card"
{
InsertAllowed = false;
DeleteAllowed = false;
}
After publishing this extension:
-
The + New button hide.
-
Users cannot create or delete customers.
-
They can still open and edit existing records (unless you also set
ModifyAllowed = false
).
So basically: with a few lines of AL code, you can make sure users only work with existing customers, without giving them the option to add or delete.
Thank You,
Dharmendra Chavda
Comments
Post a Comment