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

# foreigndevice table

> Middle level of Foreign Key system

## foreigndevice Table (182)

Middle level of Foreign Key system

## Fields

| Name                      | Description                                              | Type                              | Nullable |
| ------------------------- | -------------------------------------------------------- | --------------------------------- | :------: |
| foreigndevice\_id         | Primary key                                              | PK                                |    No    |
| name                      | Name of device                                           | String(31)                        |    No    |
| device\_id                | Optional unique id of device (Palm pilot device ID, etc) | String(239)                       |    Yes   |
| foreignapp\_id            | Reference to foregin application (device type)           | FK [foreignapp](./foreignapp.mdx) |    No    |
| owner\_id                 | Reference to SO user owning this device                  | FK [associate](./associate.mdx)   |    No    |
| lastsynced                | Last sync date                                           | DateTime                          |    Yes   |
| lastsynced\_trans         | Last sync traveltransactionlog id number                 | DateTime                          |    Yes   |
| registered                | Registered when                                          | UtcDateTime                       |    No    |
| registered\_associate\_id | Registered by whom                                       | FK [associate](./associate.mdx)   |    No    |
| updated                   | Last updated when                                        | UtcDateTime                       |    No    |
| updated\_associate\_id    | Last updated by whom                                     | FK [associate](./associate.mdx)   |    No    |
| updatedCount              | Number of updates made to this record                    | UShort                            |    No    |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/foreigndevice.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=7ecefa08624bfaa37e364091d0292c63" alt="foreigndevice table relationship diagram" width="683" height="657" data-path="media/loc/en/database/tables/foreigndevice.png" />

## Indexes

| Fields         | Types       | Description |
| -------------- | ----------- | ----------- |
| name           | String(31)  | Index       |
| device\_id     | String(239) | Index       |
| foreignapp\_id | FK          | Index       |
| owner\_id      | FK          | Index       |

## Relationships

| Table                      | Description                                                                                                                                                                                                                |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [associate](./associate)   | Employees, resources and other users - except for External persons                                                                                                                                                         |
| [foreignapp](./foreignapp) | Top level of Foreign Key system                                                                                                                                                                                            |
| [foreignkey](./foreignkey) | Foreign Key - enables storage of arbitrary extra key information for every table/row in SuperOffice. You may use this table to store your extra information instead of using the dictionary SDK to create your own tables. |

## Replication Flags

* Replicate changes DOWN from central to satellites and travellers.
* Replicate changes UP from satellites and travellers back to central.
* Copy to satellite and travel prototypes.

## Security Flags

* No access control via user's Role.


## Related topics

- [Foreign keys](/en/api/foreign-keys/index.md)
- [foreignkey table](/en/database/tables/foreignkey.md)
- [foreignapp table](/en/database/tables/foreignapp.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)
- [Save Device By Identifier](/en/api/reference/restful/agent/foreignsystem_agent/save-device-by-identifier.md)
