# Commands

## CloseCommand

A command when used with ExecuteCommands that closes an Object.

#### Syntax <a href="#pragma-line-4729" id="pragma-line-4729"></a>

```
CloseCommand ( Object )
```

#### Parameters <a href="#pragma-line-4735" id="pragma-line-4735"></a>

***Object***\
&#x20;The Object to close.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-4742" id="pragma-line-4742"></a>

Command

## DownloadCommand

A command when used with ExecuteCommands that downloads a Document.

#### Syntax <a href="#pragma-line-4751" id="pragma-line-4751"></a>

```
DownloadCommand ( Document )
```

#### Parameters <a href="#pragma-line-4757" id="pragma-line-4757"></a>

***Document***\
&#x20;The Document to download.\
&#x20;Type: Document

#### Return Type <a href="#pragma-line-4764" id="pragma-line-4764"></a>

Command

## DownloadFromInstanceCommand

A command when used with ExecuteCommands that downloads a Document from an Object.

#### Syntax <a href="#pragma-line-4773" id="pragma-line-4773"></a>

```
DownloadFromInstanceCommand ( Object )
```

#### Parameters <a href="#pragma-line-4779" id="pragma-line-4779"></a>

***Object***\
&#x20;The Object to download the Document from.\
&#x20;Type: Object

#### Return Type <a href="#pragma-line-4786" id="pragma-line-4786"></a>

Command

## ExecuteCommands

Exits the Script and executes the given Commands.

#### Syntax <a href="#pragma-line-4795" id="pragma-line-4795"></a>

```
ExecuteCommands ( Commands )
```

#### Parameters <a href="#pragma-line-4801" id="pragma-line-4801"></a>

***Commands***\
&#x20;The Commands to execute.\
&#x20;Type: List\<Command>

#### Return Type <a href="#pragma-line-4808" id="pragma-line-4808"></a>

Exit

## LoadNewCommand

A command when used with ExecuteCommands that loads an Object new.

#### Syntax <a href="#pragma-line-4817" id="pragma-line-4817"></a>

```
LoadNewCommand ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-4823" id="pragma-line-4823"></a>

***Object***\
&#x20;The Object to load new.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the new Layout for the Object.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-4834" id="pragma-line-4834"></a>

Command

## MessageCommand

A command when used with ExecuteCommands that displays a Message

#### Syntax <a href="#pragma-line-4843" id="pragma-line-4843"></a>

```
MessageCommand ( Message )
```

#### Parameters <a href="#pragma-line-4849" id="pragma-line-4849"></a>

***Message***\
&#x20;The Message to display.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-4856" id="pragma-line-4856"></a>

Command

## OpenCommand

A command when used with ExecuteCommands that opens an Object.

#### Syntax <a href="#pragma-line-4865" id="pragma-line-4865"></a>

```
OpenCommand ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-4871" id="pragma-line-4871"></a>

***Object***\
&#x20;The Object to open.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout to open the Object with.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-4882" id="pragma-line-4882"></a>

Command

## RefreshCommand

A command when used with ExecuteCommands that refreshes an Object.

#### Syntax <a href="#pragma-line-4891" id="pragma-line-4891"></a>

```
RefreshCommand ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-4897" id="pragma-line-4897"></a>

***Object***\
&#x20;The Object to refresh.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout for the refreshed Object.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-4908" id="pragma-line-4908"></a>

Command

## ReloadApplicationCommand

A command when used with ExecuteCommands that reloads the entire Application.

#### Syntax <a href="#pragma-line-4917" id="pragma-line-4917"></a>

```
ReloadApplicationCommand (  )
```

#### Parameters <a href="#pragma-line-4923" id="pragma-line-4923"></a>

No parameters

#### Return Type <a href="#pragma-line-4927" id="pragma-line-4927"></a>

Command

## ReloadCommand

A command when used with ExecuteCommands that reloads an Object.

#### Syntax <a href="#pragma-line-4936" id="pragma-line-4936"></a>

```
ReloadCommand ( Object [, LayoutId] )
```

#### Parameters <a href="#pragma-line-4942" id="pragma-line-4942"></a>

***Object***\
&#x20;The Object to reload.\
&#x20;Type: Object

***LayoutId*** (optional)\
&#x20;The ID of the Layout for the reloaded Object.\
&#x20;Type: Guid

#### Return Type <a href="#pragma-line-4953" id="pragma-line-4953"></a>

Command


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tivity.one/building-an-application/execution/scripting/functions/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
