Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

(1) ShareShare
ReportReport
Posted on by 634

I am trying to open sales order page in Editable mode in dynamics nav 2013 r2 using C/AL. I have tried the following method But it did not worked.
Have any one tried this?

PAGE.RUN(PAGE::"Sales Order",SalesHeaderPOC);
//SalesOrder.SETTABLEVIEW(SalesHeaderPOC);
// SalesOrder.EDITABLE := TRUE;
// SalesOrder.RUN;

How do you program a page so it opens in Edit mode

*This post is locked for comments

  • Suggested answer
    erpeon Profile Picture
    erpeon 10 on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    Hi,

    I had the same issue and my experience is:

    ShipmentPackPage.SETRECORD(ShipmentBufferHeader);
    ShipmentPackPage.EDITABLE(TRUE);
    ShipmentPackPage.RUN;

    This opens from a Role Center Tile in non-editable state.

    But when using RUNMODAL

    ShipmentPackPage.SETRECORD(ShipmentBufferHeader);
    ShipmentPackPage.EDITABLE(TRUE);
    ShipmentPackPage.RUNMODAL;

    This opens from a Role Center Tile in editable state :) 

    Cheers,

    Henrik

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    Page.RUNMODAL has nothing to do on editability of the page. The editability is SER with the EDITABLE(true or false) property. PAGE.RUNMODAL opens the page modally and stop.

    A card page is editable as default when opened in this way.

    If you try this:

    YourCardPage.EDITABLE(FALSE);

    YourCardPage.RUNMODAL;

    the page is now opened in READONLY mode.

  • Rehan Satti Profile Picture
    Rehan Satti 634 on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    Hi @Rock With NAV,

    My issue was to open the card page in editable mode. List page will obviously not open in editable mode.

    I have customized the Navigate page to search Sales order. I want to show the found order card page in editable mode. By default NAV navigate page open all the relevant pages like ledger entries .etc in read only mode. in the Show record action.

    I have gone through this post at mibuso. But it did not work

    I know technical it does not make any sense. When a page is run modally, no input, such as a keyboard or mouse click, can occur except for objects on the modal page. 

    This what I did and it worked for me in NAV 2013. Have a look at the code.

    pag.run.PNG

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    I am sorry to say but I disagree on this -

    What you are saying is - "However I have found the solution, You need to use PAGE.RUNMODAL(page,Record). This will open the page in editable mode in NAV 2013 R2."

    PAGE.RUNMODAL has nothing to do on editability part, It's totally a separate entity. Seems like you are opening Page 42 which is already in a Editable mode hence you find it editable, if you replace this with Sales Order List Page it won't be editable anymore!!

  • Verified answer
    Rehan Satti Profile Picture
    Rehan Satti 634 on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    Hi Guys,

    I have spent some time on this. 

     SalesOrder.EDITABLE(TRUE);

    Setting editable like this did not seem to work either in NAV 2013 R2. It work on the higher version of NAV like NAV 2017.

    I have seen couple of posts for similar solution. Bu none of them worked in this scenario.

    However I have found the solution, You need to use PAGE.RUNMODAL(page,Record). This will open the page in editable mode in NAV 2013 R2.

    2018_2D00_05_2D00_21-10_5F00_42_5F00_35_2D00_10.45.0.15-_2D00_-Remote-Desktop-Connection-Manager-v2.7.png

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    You can try this once SalesOrderPage.EDITABLE(TRUE);

    I remember in 2009 SP1 Forms - Normaly it accepts both the syntax but sometimes in some case SalesOrderPage.EDITABLE(TRUE); works but SalesOrderPage.EDITABLE := TRUE dont.

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: Default to Edit mode when opening pages Dynamics NAV 2013 R2 C/AL

    SalesOrderPage.EDITABLE(TRUE);

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 Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,356 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans