Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

CNContactStore.FetchContact

Fetches a fresh copy of this contact.

Component Version macOS Windows Linux Server iOS SDK
Contacts 12.1 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContactStore.FetchContact"; ContactIdentifier )   More

Parameters

Parameter Description Example
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"

Result

Returns contact identifier or error.

Description

Fetches a fresh copy of this contact.
Your contact may be from the picker and not have all fields loaded. Or it may be outdated and you like to get a fresh copy.
This function takes an identifier and picks a fresh copy of the contact and returns a new reference (or the same).
Then you can query values with CNContact.Value.

Examples

Check if account is there:

Set Variable [ $ContactIdentifier ; Value: "36B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" ]
Set Variable [ $r ; Value: MBS( "CNContactStore.FetchContact"; $ContactIdentifier ) ]
If [ MBS("IsError") = 0 ]
    Show Custom Dialog [ "Found" ; MBS( "CNContact.Name"; $ContactIdentifier ) ]
Else
    Show Custom Dialog [ "Failed" ; "Invalid ID." ]
End If

See also

Release notes

Blog Entries

This function checks for a license.

Created 10th February 2022, last changed 1st March 2023


CNContactStore.DeleteGroup - CNContactStore.GroupHierarchy

💬 Ask a question or report a problem