Dynamics 365 Business Central: Make the same column editable or non-editable based on different conditions on the list page (Dynamic Editable Control for the Same Column)

Dynamics 365 Business Central

Hi, Readers.
Today I would like to share another mini tip about Business Central, how to make the same column editable or non-editable based on different conditions on the list page (Dynamic Editable Control for the Same Column)

While discussing requirements with a customer recently, I received a unique request.
In a list page, they want a specific column to be editable only for rows that meet certain conditions, and non-editable for all other rows.
Is this possible to achieve? Please note that we don’t want an error message; the field should simply be non-editable from the start.

We have previously discussed some similar requirements, such as:

In conclusion, yes, this is absolutely possible to achieve. Let’s look at a simple example.

I have added a new custom field, “Editable Description” (Boolean), to the “Units of Measure” page (Page 209, List).
The goal is to use this new field to dynamically control the editability of the standard “Description” field.
Specifically, the standard “Description” field should be editable only for rows where this new field is checked, and remain non-editable for all other lines.

Let’s watch a test video.

The implementation is quite simple, you just need to control the Editable property using a variable.
While you could technically use the field value directly, I created a new variable here to make it easier to understand.

Great. Give it a try!!!😁

My test code: for reference only

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL