> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bool

> Represents booleans as objects. True/false.

Represents booleans as objects. True/false.

Variables of this type are commonly used in comparisons and conditional statements.

## Constructors

### Bool()

```crmscript theme={null}
Bool Bool()
```

Default constructor.

### Bool(Bool)

```crmscript theme={null}
Bool Bool(Bool value)
```

Pass a boolean value to copy into a new object.

## Methods

## toInteger()

Converts a boolean value to its integer representation (0 or 1).

```crmscript theme={null}
Integer toInteger()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - False equals 0; true equals 1.

## toString()

Converts a boolean value to its string representation ("true" or "false").

```crmscript theme={null}
String toString()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - "true" or "false"

**Example:**

```crmscript theme={null}
Bool b = true;
printLine(b.toString());
```


## Related topics

- [Bool data type](/en/automation/crmscript/datatypes/bool-type.md)
- [NSFieldInfoBool](/en/automation/crmscript/reference/CRMScript.NetServer.NSFieldInfoBool.md)
- [SuperOffice.WebApi.Data.StringBoolDictionary](/en/api/reference/webapi/SuperOffice.WebApi.Data.StringBoolDictionary.md)
- [SuperOffice.WebApi.Data.FieldInfoBool](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoBool.md)
- [SuperOffice.WebApi.Agents.DiagnosticsAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.DiagnosticsAgent.md)
- [SuperOffice.WebApi.Agents.IDiagnosticsAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IDiagnosticsAgent.md)
