Skip to main content

Notifications

Announcements

No record found.

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 :) 

  • Suggested answer
    Nitin Verma Profile Picture
    21,384 Moderator on at
    RE: Sales Page change field editable

    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.

  • Suggested answer
    YUN ZHU Profile Picture
    78,733 Super User 2025 Season 1 on at
    RE: Sales Page change field editable

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans