Dynamics 365 Business Central: How to easily hide/disable the AssistEdit button – Customization

Dynamics 365 Business Central

Hi, Readers.
Last week we briefly discussed Dynamics 365 Business Central: TableRelation, Enum/Option, Lookup and AssistEdit – What’s the difference on the page (UI).

Today I would like to briefly share a question I saw in the Business Central forum before, how to easily hide the AssistEdit button.
For example, No. field on the Item Card:

In base application:

Settings on the My Settings page:

In base application:

What should we do if we want to prohibit users from clicking this button? A simple idea is to add the control code in the OnAssistEdit (Page Field Extension) trigger. Let’s look at a simple example,

But there is actually a simpler way, the following remark is mentioned in MS Learn (Docs).

The AssistEdit Property must be set to True to enable the assist-edit capabilities.

So we just need to set this property to false, and this button will be hidden on the page (UI).

Here is a practical example: In the My Settings page, users are not allowed to change Role, Company, Region, Language, and Time Zone.

Great.

PS: Please note that the value of this property cannot be set with variables or formulas.

Syntax error, boolean literal expectedAL AL0220

Very simple, give it a try!!!😁

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL