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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Sales Page change field editable

(0) ShareShare
ReportReport
Posted on by 30

Hello Guys.

I'm struggling with a job, where i need to change a field property "Editable"...

I have a value in the "Sales Header" table - when that changes from '' to anything, i wanna trigger the property change, so the fields after that gets locked for editable... 

I really can't figure out how, as i see it i can only change field properties in the Page Extension - but here i can't figure out how to trigger it when another field value changes...

Please heeelp :) 

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    101,846 Super User 2026 Season 1 on at

    Hi, hope the following helps.

    The page mode that the page was opened in (Editable of the page):

    https://yzhums.com/9132/

    Switching a page to non-editable in real time via a field value:

    https://yzhums.com/16756/

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi RasmusAKEA,

    To achieve this you have to use OnafterGetCurrRecord trigger of that page, you can do the following

    pageextension 66003 "ModifySO" extends "Sales Order" //42

    {

       layout

       {

           modify("Sell-to Phone No.")

           {

               trigger OnAfterValidate()

               begin

                   CurrPage.Update();

               end;

           }

           modify("External Document No.")

           {

               Editable = ControlEditable;

           }

       }

       trigger OnAfterGetCurrRecord()

       begin

           ControlEditable := rec."Sell-to Phone No." = '';

       end;

       var

           ControlEditable: Boolean;

    }

    Here you can replace your own fields for Phone No. and external document no.

    Let me know if that you are looking for

    Thanks.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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,466 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,829 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,505

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans