{"title":"TestPart data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/testpart/testpart-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/testpart/testpart-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/testpart/testpart-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 of type Part.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Instance methods","slug":"instance-methods","at":151,"chars":2081},{"level":2,"title":"Related information","slug":"related-information","at":2232,"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 of type Part.\n## Instance methods\nThe following methods are available on instances of the TestPart data type.\nMethod name|Description\ntestpart-caption-method|Gets the caption of the test page.\ntestpart-editable-method|Gets the runtime value of the Editable property on a test page.\ntestpart-enabled-method|Gets the enabled state for the part.\nExpand(Boolean)<testpart-expand-method>|Expands rows on a test page.\nFindFirstField(TestField, Any)<testpart-findfirstfield-method>|Finds the first field in the data set that is displayed on a test page.\nFindNextField(TestField, Any)<testpart-findnextfield-method>|Finds the next field in the data set that is displayed on a test page.\nFindPreviousField(TestField, Any)<testpart-findpreviousfield-method>|Finds the previous field in the data set that is displayed on a test page.\ntestpart-first-method|Sets the current row of the test page as the first row in the data set.\nGetField(Integer)<testpart-getfield-method>|Gets a field on a test page.\nGetValidationError([Integer])<testpart-getvalidationerror-method>|Gets the list of all validation error that occurred on a test page as a string.\nGoToKey([Any,...])<testpart-gotokey-method>|Finds the row in a data set on the test page that is identified by the specified values.\nGoToRecord(Record)<testpart-gotorecord-method>|Finds the specified record in a data set on a test page.\ntestpart-isexpanded-method|Specifies if the current row on the test page is expanded.\ntestpart-last-method|Sets the current row of the test page as the last row in the data set.\ntestpart-new-method|Sets the current row of the test page to an empty row in a data set.\ntestpart-next-method|Sets the current row of the test page as the next row in the data set.\ntestpart-prev-method|Sets the current row of the test page as the previous row in the data set.\ntestpart-previous-method|Sets the current row of the test page as the previous row in the data set.\ntestpart-validationerrorcount-method|Gets the number of validation errors that occurred on the test page.\ntestpart-visible-method|Gets the visible state for the part.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}