Addressbook.record.UniqueID
---------------------------

Returns the unique ID for a record.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Addressbook](component_Addressbook.md) | [3.1](newinversion31.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [Contacts](component_Contacts.md) functions instead.

MBS( "Addressbook.record.UniqueID"; RecordID ) 

**MBS**( **"Addressbook.record.UniqueID";** /\* Returns the unique ID for a record. \*/  
**$RecordID**) /\* The unique ID for the target person or group.e.g. $personID \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| RecordID | The unique ID for the target person or group. | $personID |

### Result

Returns the unique ID for a record.

### Description

Returns the unique ID for a record.  
Use this method to query the record ID for a new person or group after you saved it.  
### Examples

Create person and save changes:

 $personID = MBS ( "[Addressbook.NewPerson](AddressbookNewPerson.md)" )  
$r = MBS ( "[Addressbook.record.SetValueForProperty](AddressbookrecordSetValueForProperty.md)"; $personID ; "FirstNameProperty"; "John" )  
$r = MBS ( "[Addressbook.addRecord](AddressbookaddRecord.md)"; $personID )  
$r = MBS ( "[Addressbook.save](Addressbooksave.md)" )  
\# Learn real ID for new record   
$personID = MBS ( "Addressbook.record.UniqueID"; $personID )  
### See also

- [Addressbook.addRecord](AddressbookaddRecord.md)
- [Addressbook.NewPerson](AddressbookNewPerson.md)
- [Addressbook.record.SetValueForProperty](AddressbookrecordSetValueForProperty.md)
- [Addressbook.save](Addressbooksave.md)

### Example Databases

- [Mac and iOS/Addressbook/Addressbook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Addressbook/Addressbook.shtml#3ScriptAnchor_)

### Blog Entries

- [Filemaker and the Mac OS X Addressbook](https://www.mbsplugins.de/archive/2013-05-04/Filemaker_and_the_Mac_OS_X_Add/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[Addressbook.record.SetValueForProperty](AddressbookrecordSetValueForProperty.md) - [Addressbook.record.displayname](Addressbookrecorddisplayname.md)

[HTML Version](AddressbookrecordUniqueID.shtml)