# Codeunit.Run(Text [, var Record]) Method
> Version: _Available or changed with runtime version 17.0._
Loads and runs the unit of AL code you specify. To use this method, you can specify a table associated with the codeunit when you defined the codeunit properties. This allows you to pass a variable with the method. The transaction that the codeunit contains is always committed due to the Boolean return value.
## Syntax
```al
[Ok := ]  Codeunit.Run(FullyQualifiedName: Text [, var Record: Record])
```
## Parameters
FullyQualifiedName
Type: ../text/text-data-type
The fully qualified name of the codeunit that you want to run. If the codeunit you specify does not exist, a run-time error occurs. If you run the codeunit with a record from a table other than the one it is associated with, a run-time error occurs.
*[Optional] Record*
Type: ../record/record-data-type
This optional parameter identifies a record. This parameter is a record data type.
## Return Value
*[Optional] Ok*
Type: ../boolean/boolean-data-type
true if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
## See Also
codeunit-data-type
Getting 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/codeunit/codeunit-run-string-table-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/codeunit/codeunit-run-string-table-method/
