# OnAssistEdit (Page Field Extension) trigger
> Version: _Available or changed with runtime version 3.0._
Runs in place of the AssistEdit property features that are provided in the application.
## Syntax
```al
trigger OnAssistEdit()
begin
    ...
end;
```
> NOTE
> The trigger is not invoked on a page that is in view mode.
## Remarks
The ../../properties/devenv-assistedit-property must be set to true to enable the assist-edit capabilities.
If there's an error in the trigger code, then the page is closed. You can use this trigger to write to the database.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
OnAssistEdit (Page Field) Trigger<../pagefield/devenv-onassistedit-pagefield-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/pagefieldextension/devenv-onassistedit-pagefieldextension-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/pagefieldextension/devenv-onassistedit-pagefieldextension-trigger/
