CNContactStore.DeleteGroup
--------------------------

Deletes a group.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Contacts](component_Contacts.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CNContactStore.DeleteGroup"; GroupIdentifier ) 

**MBS**( **"CNContactStore.DeleteGroup";** /\* Deletes a group. \*/  
**$GroupIdentifier**) /\* The group identifier.  
Can be identifier or group name.e.g. "F527BF7C-6426-4D48-86CA-CB5E57743FFE:ABGroup" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| GroupIdentifier | The group identifier.   Can be identifier or group name. | "F527BF7C-6426-4D48-86CA-CB5E57743FFE:ABGroup" |

### Result

Returns OK or error.

### Description

Deletes a group.  
### Examples

Delete group:

 If \[ Length ( Contacts::GroupID ) = 0 \]   
 Show Custom Dialog \[ "Failed to delete a group" ; "No ID in field" \]   
Else  
 Set Variable \[ $r ; Value: MBS ( "CNContactStore.DeleteGroup"; Contacts::GroupID ) \]   
 If \[ MBS ("IsError") \]   
 Show Custom Dialog \[ "Failed to delete a group" ; $r \]   
 Else  
 Set Field \[ Contacts::GroupID ; "" \]   
 End If  
End If  
### See also

- [CNContactStore.AddGroup](CNContactStoreAddGroup.md)
- [CNContactStore.AddSubgroup](CNContactStoreAddSubgroup.md)
- [CNContactStore.DeleteContact](CNContactStoreDeleteContact.md)
- [CNContactStore.RenameGroup](CNContactStoreRenameGroup.md)
- [IsError](IsError.md)

### Example Databases

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

This function checks for a license.

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

  
[CNContactStore.DeleteContact](CNContactStoreDeleteContact.md) - [CNContactStore.FetchContact](CNContactStoreFetchContact.md)

[HTML Version](CNContactStoreDeleteGroup.shtml)