{"title":"OnAfterGetRecord (Request Page Extension) trigger","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/triggers-auto/requestpageextension/devenv-onaftergetrecord-requestpageextension-trigger/","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/triggers-auto/requestpageextension/devenv-onaftergetrecord-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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/triggers-auto/requestpageextension/devenv-onaftergetrecord-requestpageextension-trigger","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":"Runs after a record is retrieved from a table but before it is displayed to the user.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"OnAfterGetRecord (Request Page Extension) trigger","slug":"onaftergetrecord-request-page-extension-trigger","at":0,"chars":1445},{"level":2,"title":"Syntax","slug":"syntax","at":198,"chars":66},{"level":2,"title":"Remarks","slug":"remarks","at":264,"chars":577},{"level":2,"title":"Related information","slug":"related-information","at":841,"chars":604}],"text":"# OnAfterGetRecord (Request Page Extension) trigger\n> Version: _Available or changed with runtime version 7.0._\nRuns after a record is retrieved from a table but before it is displayed to the user.\n## Syntax\n```al\ntrigger OnAfterGetRecord()\nbegin\n    ...\nend;\n```\n## Remarks\nUse this trigger to calculate variables that depend on the current record.\nThis trigger is independent of the currently selected record in the UI. When it gets raised depends on when the UI needs to load more data and the block size of the data read. So, for example, in a list page, where rows are read in larger blocks, then the OnAfterGetRecord trigger will be raised for each of the records read before the page is shown.\nWithin the trigger, the Rec variable will refer to the record just read.\nIf there is an error in the trigger code, then the page is closed.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>\n../page/devenv-onaftergetrecord-page-trigger\nOnAfterGetRecord (Request Page) Trigger<../requestpage/devenv-onaftergetrecord-requestpage-trigger>\nOnAfterGetRecord (Page Extension) Trigger<../pageextension/devenv-onaftergetrecord-pageextension-trigger>\nOnAfterGetRecord (Report Data Item) Trigger<../reportdataitem/devenv-onaftergetrecord-reportdataitem-trigger>\nOnAfterGetRecord (Xml Port Table Element) Trigger<../xmlporttableelement/devenv-onaftergetrecord-xmlporttableelement-trigger>"}