{"title":"Simple list page code example","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-simple-list-page-example/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-simple-list-page-example, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-simple-list-page-example","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Provides AL code for a simple list type page","date":"2021-04-01","meta":{"topic":"article"},"outline":[{"level":1,"title":"Simple list page code example","slug":"simple-list-page-code-example","at":0,"chars":3060},{"level":2,"title":"Related information","slug":"related-information","at":2752,"chars":308}],"text":"# Simple list page code example\nThe AL code in this article creates a simple list page that displays records from an existing table.\n![List page example.]\nFor a more detailed explanation of the list page, see devenv-designing-list-pages.\n```al\npage 50111 SampleCustomerList\n{\n    PageType = List;\n    ApplicationArea = All;\n\n    // Specifies the page to display records from the Customer table.\n    SourceTable = Customer;\n\n    // Makes the page searchable from the Tell me what you want to do feature.\n    UsageCategory = Lists;\n\n    // Specifies the card page Sample Customers to be uses for modifying or creating new customer records.\n    CardPageId = 50112;\n\n    // Sets the title of the page to Sample Customers.\n    Caption = 'Sample Customers';\n\n    layout\n    {\n        area(Content)\n        {\n            // Sets the No., Name, Contact, and Phone No. fields in the Customer table to be displayed as columns in the list.\n            repeater(Group)\n            {\n                field(\"No.\"; \"No.\")\n                {\n                    ApplicationArea = All;\n\n                }\n                field(Name; Name)\n                {\n                    ApplicationArea = All;\n\n                }\n                field(Contact; Contact)\n                {\n                    ApplicationArea = All;\n                }\n\n                field(Phone; \"Phone No.\")\n                {\n                    ApplicationArea = All;\n\n                }\n            }\n        }\n\n    }\n\n    actions\n    {\n        // Adds an action on the Actions menu of the action bar that opens the page Customer Ledger Entries.\n        area(Processing)\n        {\n            action(\"Ledger Entries\")\n            {\n                ApplicationArea = All;\n                RunObject = page \"Customer Ledger Entries\";\n                trigger OnAction();\n                begin\n\n                end;\n            }\n        }\n\n        // Promotes an action for creating a sales quote to promoted action menu called New.\n        area(Creation)\n        {\n            action(\"New Sales Quote\")\n            {\n                ApplicationArea = All;\n                RunObject = page \"Sales Quote\";\n                Promoted = true;\n                PromotedCategory = New;\n                Image = NewSalesQuote;\n                trigger OnAction();\n                begin\n\n                end;\n            }\n        }\n\n        // Adds an action on the Report menu that opens the Top 10 List report.\n        area(Reporting)\n        {\n            action(\"Top 10 List\")\n            {\n                ApplicationArea = All;\n                RunObject = report \"Customer - Top 10 List\";\n                trigger OnAction();\n                begin\n\n                end;\n            }\n        }\n    }\n}\n```\n## Related information\nAL Development Environment<devenv-reference-overview>\nPage Extension Object<devenv-page-ext-object>\ndevenv-actions-overview\nAdd pages and reports to Tell me<devenv-al-menusuite-functionality>\nPersonalizing Your Workspace</ui-personalization-user>\nUse Designer<devenv-inclient-designer>"}