# TestPage.Yes() Method
> Version: _Available or changed with runtime version 1.0._
Gets the Yes system action.
## Syntax
```al
Action :=   TestPage.Yes()
```
## Parameters
TestPage
Type: testpage-data-type
An instance of the testpage-data-type data type.
## Return Value
Action
Type: ../testaction/testaction-data-type
The Yes system action.
## Remarks
The Yes action is used to confirm a modal page or test page.
The Yes method just retrieves the Yes system action, but does not execute it. To invoke the Yes action on the test page use the ../testaction/testaction-invoke-method, as shown in the example below.
## Example
The following example uses a handler method to confirm the `"Create Order From Sales"` modal test page when invoked in code.
```al
[ModalPageHandler]
procedure CreateOrderFromSalesModalPageHandler(var CreateOrderFromSales: TestPage "Create Order From Sales")
begin
    CreateOrderFromSales.Yes.Invoke();
end;
```
## Related information
testpage-data-type
../testaction/testaction-invoke-method
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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-yes-method, 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/methods-auto/testpage/testpage-yes-method/
