Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

CNContactStore.DeleteContact

Delete a contact from the contact store.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Contacts 8.4 Yes No No No Yes
MBS( "CNContactStore.DeleteContact"; ContactIdentifier )   More

Parameters

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

Result

Returns OK or error.

Description

Delete a contact from the contact store.

Examples

Delete contact:

If [ Length ( Contacts::ContactID ) = 0 ]
    Show Custom Dialog [ "Failed to delete a contact" ; "No ID in field" ]
Else
    Set Variable [ $r ; Value: MBS( "CNContactStore.DeleteContact"; Contacts::ContactID) ]
    If [ MBS("IsError") ]
        Show Custom Dialog [ "Failed to delete a contact" ; $r ]
    Else
        Set Field [ Contacts::ContactID ; "" ]
    End If
End If

See also

Example Databases

Created 1st August 2018, last changed 6th August 2018


CNContactStore.DefaultContainerIdentifier   -   CNContactStore.DeleteGroup

Feedback: Report problem or ask question.




Links
MBS FileMaker blog