web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Switching a page to non-editable

(0) ShareShare
ReportReport
Posted on by 237

Hi

I would like to 1. update some fields on a page  2. switch the page to non-editable  at the same time by one action.

If I proceed like:

  Step 1  update fields and change EDITABLE property within one action

  Step 2  close the page

  Step 3  reopen the page

the page becomes non-editable. But I would like to make the page non-editable already at the end of Step 1 like pressing the pencil (or crayon) icon.

Is it possible?

Please advise.

Thank you.

Thank you.

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    157 on at

    Do you use currpage.update();

    docs.microsoft.com/.../update

  • adams1124 Profile Picture
    237 on at

    Thank you, Josh.

    Yes, I tried and currpage.update() only becomes effective when the page is reopened.

    I wonder if there is any other way.

  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    Hello,

    Below is a prototype only of a page with two fields. If you enter something beginning with 'E' (case sensitive) in field 2, then the two fields go Uneditable. You can make them re-editable again from the Actions. It's setting editable on a group scope as opposed to the whole page. I hope that gives some ideas?

    page 50107 TestEditable
    {
        PageType = Card;
        ApplicationArea = All;
        UsageCategory = Administration;

        layout
        {
            area(Content)
            {
                group(GroupName)
                {
                    Visible = IsVisible;
                    Editable = IsEditable;

                    field(F1; F1{ ApplicationArea = All; }
                    field(F2; F2)
                    {
                        ApplicationArea = all;
                        trigger OnValidate()
                        var
                            myInt: Integer;
                        begin
                            if CopyStr(F2, 1'E' then
                                IsEditable := false;

                        end;
                    }

                }
            }
        }

        actions
        {
            area(Processing)
            {
                action(ActionName)
                {
                    ApplicationArea = All;
                    Caption = 'Make Editable';

                    trigger OnAction()
                    begin
                        IsEditable := true;

                    end;
                }
            }
        }

        trigger OnOpenPage()
        var
            myInt: Integer;
        begin
            IsVisible := true;
            IsEditable := true;

        end;


        var
            myInt: Integer;
            F1: Text;
            F2: Text;
            IsVisible: Boolean;
            IsEditable: Boolean;
    }
  • adams1124 Profile Picture
    237 on at

    Thank you very much, Lars.

    The prototype is amazing and I did not know that we can change the property like that.

    However, I should have told that I am trying to do this with a Page Extension. I have learned that the Editable property of the entire Page cannot be changed in an Extension.

    So I could only close the Page in question and reopen it to reflect the change to the Editable property?

  • Verified answer
    YUN ZHU Profile Picture
    101,458 Super User 2026 Season 1 on at

    Hi, A very simple example, hope to give you some inspiration.

    pastedimage1628730523652v1.png

    [View:/cfs-file/__key/communityserver-discussions-components-files/758/Test0812.mp4:1013:760]

  • adams1124 Profile Picture
    237 on at

    Thank you very much, Yun.

    YES, it works now in my extension.

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,260 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,515 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,373

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans