{"title":"TestPage data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/testpage/testpage-data-type/","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/methods-auto/testpage/testpage-data-type, 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/methods-auto/testpage/testpage-data-type","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":"Represents a variable type that can be used to test Page Application Objects.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Instance methods","slug":"instance-methods","at":138,"chars":2897},{"level":2,"title":"Related information","slug":"related-information","at":3035,"chars":117}],"text":"> Version: _Available or changed with runtime version 1.0._\nRepresents a variable type that can be used to test Page Application Objects.\n## Instance methods\nThe following methods are available on instances of the TestPage data type.\nMethod name|Description\ntestpage-cancel-method|Gets the Cancel system action.\ntestpage-caption-method|Gets the caption of the test page.\ntestpage-close-method|Closes an open test page.\ntestpage-edit-method|Gets the Edit system action.\ntestpage-editable-method|Gets the runtime value of the Editable property on a test page.\nExpand(Boolean)<testpage-expand-method>|Expands rows on a test page.\nFindFirstField(TestField, Any)<testpage-findfirstfield-method>|Finds the first field in the data set that is displayed on a test page.\nFindNextField(TestField, Any)<testpage-findnextfield-method>|Finds the next field in the data set that is displayed on a test page.\nFindPreviousField(TestField, Any)<testpage-findpreviousfield-method>|Finds the previous field in the data set that is displayed on a test page.\ntestpage-first-method|Sets the current row of the test page as the first row in the data set.\nGetField(Integer)<testpage-getfield-method>|Gets a field on a test page.\nGetValidationError([Integer])<testpage-getvalidationerror-method>|Gets the list of all validation error that occurred on a test page as a string.\nGoToKey([Any,...])<testpage-gotokey-method>|Finds the row in a data set on the test page that is identified by the specified values.\nGoToRecord(Record)<testpage-gotorecord-method>|Finds the specified record in a data set on a test page.\ntestpage-isexpanded-method|Specifies if rows on a test page are expanded.\ntestpage-last-method|Sets the current row of the test page as the last row in the data set.\ntestpage-new-method|Sets the current row of the test page to an empty row in a data set.\ntestpage-next-method|Sets the current row of the test page as the next row in the data set.\ntestpage-no-method|Gets the No system action.\ntestpage-ok-method|Gets the OK system action.\ntestpage-openedit-method|Opens a test page in edit mode.\ntestpage-opennew-method|Opens a blank test page in edit mode.\ntestpage-openview-method|Opens a test page in view mode.\ntestpage-prev-method|Sets the current row of the test page as the previous row in the data set.\ntestpage-previous-method|Sets the current row of the test page as the previous row in the data set.\n[RunPageBackgroundTask(Integer [, var Dictionary of [Text, Text]] [, Boolean])](testpage-runpagebackgroundtask-method.md)|Runs the page background task codeunit in a child session and waits for its completion. Note that page background task completion triggers are not invoked by default; see parameter \"RunCompletionTriggers\".\ntestpage-trap-method|Traps the next test page that is invoked and assigns it to the test page variable.\ntestpage-validationerrorcount-method|Gets the number of validation errors that occurred on the test page.\ntestpage-view-method|Gets the View system action.\ntestpage-yes-method|Gets the Yes system action.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}