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...
Answered

Open Page in View Mode instead of edit mode when open from list page

(0) ShareShare
ReportReport
Posted on by 60

Hi,

When we double click on Item list page it opens the item card in editable mode.

How can I assure that when users double click on a line in a Item List Page, Item  Card opens in view mode?

I checked previous posts but couldn't find any answer. Its for Nav 2017

  • Jeroen Kooi Profile Picture
    17 on at
    RE: Open Page in View Mode instead of edit mode when open from list page

    Hello!

    This is my first comment, because the company I work for had this same issue (older people working with two screens and didn't knew they were in the item card for example) and it's not very hard to do this. You do need a developer licence and development environment at your disposal

    Just make a function in a codeunit (for example 50000) and name it DoubleClickView.

    Property Local to 'No'

    Parameter RecordRef (i've named my parameter pRecRef)

    Locals:

    Record: Customer (I've named mine lRecCustomer)

    Record: Vendor (I've named mine lRecVendor)

    Record Item (I've named mine lRecItem)

    You can add more records for every listpage you want to open as View instead of editable

    Add following code:

    CASE pRecRef.NUMBER OF

     18 : BEGIN

       pRecRef.SETTABLE(lRecCustomer);

       PAGE.RUN(21,lRecCustomer);

     END;

     23 : BEGIN

       pRecRef.SETTABLE(lRecVendor);

       PAGE.RUN(26,lRecVendor);

     END;

     27 : BEGIN

       pRecRef.SETTABLE(lRecItem);

       PAGE.RUN(30,lRecItem);

     END;

    END;

    Now, there is one more thing you should do. Go to the listpage and go to the Page Actions. Add a new Action 'DoubleClickView'

    Property: Visible = False. RunPageMode = View. Image = View. ShortCutKey = Return

    Local: RecordRef (for exmaple lRecRef)

    Code:

    lRecRef.GETTABLE(Rec);

    YourCodeunit.DoubleClickView(lRecRef);

    Et voíla

    Kind regards

  • Verified answer
    Suresh Kulla Profile Picture
    45,273 on at
    RE: Open Page in View Mode instead of edit mode when open from list page

    Unfortunately you cannot set mode in this scenario, you can set that if it is an action but not it opens based on CardPageID of the Item List Page, you could control the editable property of the page by setting CurrPage.EDITABLE to false and then add an action to the Item Card Page to set that value to true again

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,907 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,777 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans