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

# NSForeignDevice

> Saves a foreign device belonging to the ForeignDevice and application name specified.

Saves a foreign device belonging to the ForeignDevice and application name specified.

## Constructors

### NSForeignDevice()

```crmscript theme={null}
NSForeignDevice
```

Initializes a new instance of the NSForeignDevice class.

## Methods

## GetAssociateFullName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The person owning the Foreign Device.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String associateFullName = thing.GetAssociateFullName();
```

## GetCreatedBy()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The person that created the device.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String createdBy = thing.GetCreatedBy();
```

## GetCreatedDate()

```crmscript theme={null}
DateTime GetCreatedDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Registered when.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
DateTime createdDate = thing.GetCreatedDate();
```

## GetDeviceIdentifier()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Optional unique ID of device (Palm pilot device ID, etc).

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String deviceIdentifier = thing.GetDeviceIdentifier();
```

## GetForeignAppId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Reference to foreign application (device type).

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
Integer foreignAppId = thing.GetForeignAppId();
```

## GetForeignDeviceId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
Integer foreignDeviceId = thing.GetForeignDeviceId();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of device.

**Example:**

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

## GetUpdatedBy()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The person that last updated this device.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String updatedBy = thing.GetUpdatedBy();
```

## GetUpdatedDate()

```crmscript theme={null}
DateTime GetUpdatedDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Last updated when.

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
DateTime updatedDate = thing.GetUpdatedDate();
```

## SetAssociateFullName(String)

```crmscript theme={null}
Void SetAssociateFullName(String associateFullName)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String associateFullName;
thing.SetAssociateFullName(associateFullName);
```

## SetCreatedBy(String)

```crmscript theme={null}
Void SetCreatedBy(String createdBy)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String createdBy;
thing.SetCreatedBy(createdBy);
```

## SetCreatedDate(DateTime)

```crmscript theme={null}
Void SetCreatedDate(DateTime createdDate)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);
```

## SetDeviceIdentifier(String)

```crmscript theme={null}
Void SetDeviceIdentifier(String deviceIdentifier)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String deviceIdentifier;
thing.SetDeviceIdentifier(deviceIdentifier);
```

## SetForeignAppId(Integer)

```crmscript theme={null}
Void SetForeignAppId(Integer foreignAppId)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
Integer foreignAppId;
thing.SetForeignAppId(foreignAppId);
```

## SetForeignDeviceId(Integer)

```crmscript theme={null}
Void SetForeignDeviceId(Integer foreignDeviceId)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
Integer foreignDeviceId;
thing.SetForeignDeviceId(foreignDeviceId);
```

## SetName(String)

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

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

**Example:**

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

## SetUpdatedBy(String)

```crmscript theme={null}
Void SetUpdatedBy(String updatedBy)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
String updatedBy;
thing.SetUpdatedBy(updatedBy);
```

## SetUpdatedDate(DateTime)

```crmscript theme={null}
Void SetUpdatedDate(DateTime updatedDate)
```

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

**Example:**

```crmscript theme={null}
NSForeignDevice thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);
```


## Related topics

- [NSForeignSystemAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSForeignSystemAgent.md)
- [NSForeignAppEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSForeignAppEntity.md)
- [Delete Foreign Device](/en/api/reference/restful/agent/foreignsystem_agent/delete-foreign-device.md)
- [Save Foreign Device](/en/api/reference/restful/agent/foreignsystem_agent/save-foreign-device.md)
- [Get Foreign Device](/en/api/reference/restful/agent/foreignsystem_agent/get-foreign-device.md)
- [Foreign keys](/en/api/foreign-keys/index.md)
