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

Community site session details

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

Open Page in Edit Mode

(0) ShareShare
ReportReport
Posted on by 336

I am trying to open the Service Order card page in edit mode for a record on a list page based on a temporary table. Even when setting the page to Editable, the page opens in View mode.

Any help would be appreciated!

local procedure ShowSVCO()
    var
        pageSVCO: page "Service Order";
        svcorec: Record "Service Header";
    begin
        if Rec.DocType = Rec.DocType::SVCO then begin
            svcorec.Reset();
            svcorec.SetRange("Document Type", svcorec."Document Type"::Order);
            svcorec.SetRange("No.", Rec."No.");
            if svcorec.Find('-') then begin
                pageSVCO.SetRecord(svcorec);
                pageSVCO.Editable(true);
                pageSVCO.Run();
            end

I have the same question (0)
  • Suggested answer
    Greg Enns Profile Picture
    1,106 on at
    RE: Open Page in Edit Mode

    Maybe try running the debugger to see if another extension is overriding your code?

  • dkkipfer Profile Picture
    336 on at
    RE: Open Page in Edit Mode

    This does not work either for some reason. The only way I have been able to get it working is if I use RunModal on the page run.

  • Suggested answer
    Govinda Kumar Profile Picture
    2,254 Moderator on at
    RE: Open Page in Edit Mode

    Hi,

    You cannot make the page editable dynamically and then open it, as YUN ZHU mentioned above you have to use CurrPage,Editable. Just run the specific code and remove 'pageSVCO.Editable(true)' from your procedure and extend the service document page 5900 to add 'CurrPage.Editable(true)' to the 'onOpenPageTrigger'.

    pastedimage1682485707256v3.png

    pastedimage1682485666867v2.png

    Regards

  • Suggested answer
    YUN ZHU Profile Picture
    90,272 Super User 2025 Season 2 on at
    RE: Open Page in Edit Mode

    Hi, please use CurrPage.Editable(true) in the OnOpenPage trigger.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/page/page-editable-method

    pastedimage1682467289049v1.png

    More details: https://yzhums.com/9132/

    Hope this helps.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,710

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,675 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans