# OnOpenPage (Request Page Extension) trigger
> Version: _Available or changed with runtime version 7.0._
Runs after a request page is initialized and run.
## Syntax
```al
trigger OnOpenPage()
begin
    ...
end;
```
## Remarks
This trigger is executed after the ../page/devenv-oninit-page-trigger.
You use the OnOpenPage trigger to change dynamic properties, including those which can only be changed when the page is opened, such as the ../../properties/devenv-visible-property. You can also write to the database from the trigger.
The OnOpenPage trigger is the only trigger that can toggle the ../../properties/devenv-visible-property and the property can only be toggled on columns.
If an error occurs in the trigger execution, then the page closes.
> NOTE
> If you use the ../../methods-auto/record/record-locktable-method in the OnOpenPage trigger, then the table lock will be released when the trigger completes execution and not when the user closes the page.
> NOTE
> The OnOpenPage trigger does not support calls to control add-in methods and properties because the trigger is invoked before the page is instantiated.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
../page/devenv-onopenpage-page-trigger
OnOpenPage (Request Page) Trigger<../requestpage/devenv-onopenpage-requestpage-trigger>
OnOpenPage (Page Extension) Trigger<../pageextension/devenv-onopenpage-pageextension-trigger>

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/triggers-auto/requestpageextension/devenv-onopenpage-requestpageextension-trigger, 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. https://jonas-paprotka.de/docs/dev-itpro/developer/triggers-auto/requestpageextension/devenv-onopenpage-requestpageextension-trigger/
