Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
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 73,696 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,559 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 12,183 Most Valuable Professional on at
    Opening a table as a list in view mode

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans