Skip to main content

Notifications

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 326

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

  • Suggested answer
    Greg Enns Profile Picture
    1,102 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
    326 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,211 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
    83,070 Super User 2025 Season 1 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 813

#2
YUN ZHU Profile Picture

YUN ZHU 771 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 529

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans