> ## 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.

# NSCheckoutInfo

> Information about the checked-out state of one document, describing whether it is checked out, and to whom.

Information about the checked-out state of one document, describing whether it is checked out, and to whom.

## Constructors

### NSCheckoutInfo()

```crmscript theme={null}
NSCheckoutInfo
```

Initializes a new instance of the NSCheckoutInfo class.

## Methods

## GetAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of associate who has currently checked out the document; 0 if it is not checked out, or is checked out by someone who is not a SuperOffice user.

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
Integer associateId = thing.GetAssociateId();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of person who has currently checked out the document; blank if it is not checked out.

<Note>
  This property may also be blank if the AssociateId is nonzero; NetServer will retrieve the associates' name as needed.
</Note>

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
String name = thing.GetName();
```

## GetState()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The checkout state. See \<xref href="CRMScript.NetServer.CheckoutState" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
Integer state = thing.GetState();
```

## SetAssociateId(Integer)

```crmscript theme={null}
Void SetAssociateId(Integer associateId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
Integer associateId;
thing.SetAssociateId(associateId);
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  This property may also be blank if the AssociateId is nonzero; NetServer will retrieve the associates' name as needed.
</Note>

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
String name;
thing.SetName(name);
```

## SetState(Integer)

```crmscript theme={null}
Void SetState(Integer state)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSCheckoutInfo thing;
Integer state;
thing.SetState(state);
```


## Related topics

- [NSDocumentAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSDocumentAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [SuperOffice.WebApi.Data.CheckoutInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.CheckoutInfo.md)
- [Checkout Document](/en/api/reference/restful/rest/document/checkout-document.md)
- [Undo Checkout Document](/en/api/reference/restful/rest/document/undo-checkout-document.md)
