Business Central 2024 wave 2 (BC25): Support for modifying the properties InsertAllowed, ModifyAllowed, and DeleteAllowed of a page

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2024 release wave 2 (BC25) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

In this post, I would like to talk about Support for modifying the properties InsertAllowed, ModifyAllowed, and DeleteAllowed in Business Central 2024 release wave 2 (BC25). This is not yet documented in the Business Central 2024 release wave 2 (BC25) release plan. But it is mentioned in AL Language extension changelog Version 14.0

Added support for modifying the properties InsertAllowedModifyAllowed, and DeleteAllowed from page extensions and page customizations.

First let’s look at these three properties.
InsertAllowed: Sets a value to specify whether users can add records while using a page.
ModifyAllowed: Sets the value to determine whether users can modify records while using this page.
DeleteAllowed: Sets a value that specifies whether users can delete records while using the page.

Applies to:

  • Page
  • Request Page

For example, page 1470 “Product Videos”

The page can be opened, but cannot be inserted, modified, or deleted. Specifically, the New, Edit list/Edit, and Delete actions are not displayed.

In previous versions, these three properties were not editable. For example, “runtime”: “13.0”
AL Language extension verison: 13.0

The property ‘InsertAllowed’ cannot be customized. AL AL0246

The property ‘ModifyAllowed’ cannot be customized. AL AL0246

The property ‘DeleteAllowed’ cannot be customized. AL AL0246

AL Language extension verison: 14.0

‘Modifying InsertAllowed from Extensions’ is not available in runtime version ‘13.0’. The supported runtime versions are: ‘14.0’ or greater. AL AL0666

‘Modifying ModifyAllowed from Extensions’ is not available in runtime version ‘13.0’. The supported runtime versions are: ‘14.0’ or greater. AL AL0666

‘Modifying DeleteAllowed from Extensions’ is not available in runtime version ‘13.0’. The supported runtime versions are: ‘14.0’ or greater. AL AL0666

So in this version (BC25), that has changed. Let’s look at a detailed example, page 4 “Payment Terms”

There is no control in the standard that we can insert, modify, delete data on the page.

Modify these three properties through page extension.

pageextension 50122 PaymentTermsExt extends "Payment Terms"
{
    InsertAllowed = false;
    ModifyAllowed = false;
    DeleteAllowed = false;
}

PS: The same is true in pagecustomization.

And please note that variables cannot be set.

When you return to the page, you will find that you can no longer insert, modify, or delete data on this page.

Also note that if the CardPageID property is set for the page, this change will not take effect if you change the properties on the list page. For example, page 22 “Customer List”

At this time, you can restrict the Card page. Although users can open the card page, users cannot insert, modify or delete it.

On the Customer List page:

On the Customer Card page:

This also works for parts. For example, page 46 “Sales Order Subform”:

You may also have a question: Does this setting take effect on posted data (Posted Documents & Posted Entries)? For example, page 20 “General Ledger Entries”

Let me do a simple test. Set these three properties to true through Page Extension. (The ModifyAllowed property standard on this page is true)

You can see that the actions are displayed, but they are still not clickable. So this update will not affect the posted data (Posted Documents & Posted Entries).

PS: Dynamics 365 Business Central: Can we insert/modify/delete posted data (Posted Documents & Posted Entries) via AL???

Great. A simple update, but it adds a new option to our solution. Give it a try!!!😁

PS: This control can also be achieved through Permission Set. More details: Dynamics 365 Business Central: Difference between Table Data and Table in Permissions

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL