Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Opening a table as a list in view mode

Posted on by 6
Hello, everyone,
I have just created a file where I can open a table with all read, insert, edit and delete permissions.
My question is if it would be possible to open the page in view mode and when you select the desired record, then clicking on the edit button will activate the functionality.
I tried putting a trigger with OnOpenPage and CurrPage.Editable(false); but when I open the page all the edit buttons are disabled.
This is the code header:
 
page 58501 T112
{
    ApplicationArea = All;
    Caption = 'T112';
    PageType = List;
    SourceTable = 'Sales Invoice Header';
    UsageCategory = Administration;
    InsertAllowed = true;
    ModifyAllowed = true;
    DeleteAllowed = true;
    Permissions =
        tabledata /Sales Invoice Header/ = rimd;
   layout
    {
        area(content)
        {
            repeater(General)
            {
                field(....)
            }
         }

        trigger OnOpenPage();
          begin
             CurrPage.Editable(false);
         end;
}
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 68,586 Super User 2024 Season 2 on at
    Opening a table as a list in view mode
    Hi, you can use a variable to control the open mode, such as the following through a setting.
    Dynamics 365 Business Central: The page mode that the page was opened in (Editable of the page)
     
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 9,180 Super User 2024 Season 2 on at
    Opening a table as a list in view mode
    Hi,
     
    you can use the RunPageMode Property to set View/Edit/Create.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 8,784 Most Valuable Professional on at
    Opening a table as a list in view mode

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,326 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,166 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans