Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CNContact.DeleteValue

Deletes a value of a contact.

Component Version macOS Windows Linux Server iOS SDK
Contacts 10.1 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContact.DeleteValue"; ContactIdentifier; Selector { ; Identifier } )   More

Parameters

Parameter Description Example Flags
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"
Selector Which value to set. "givenName"
Identifier Identifier or label to delete only one entry in a list.
Pass empty text to delete all.
Optional

Result

Returns OK or error.

Description

Deletes a value of a contact.
Selector can be birthday, contactRelations, dates, departmentName, emailAddresses, familyName, givenName, imageData, imageDataAvailable, instantMessageAddresses, jobTitle, middleName, namePrefix, nameSuffix, nickname, nonGregorianBirthday, organizationName, phoneNumbers, phoneticFamilyName, phoneticGivenName, phoneticMiddleName, phoneticOrganizationName, postalAddresses, previousFamilyName, socialProfiles, thumbnailImageData, note, type, ImageData and thumbnailImageData or urlAddresses.

PhoneNumbers, emailAddresses, postalAddresses, urlAddresses, contactRelations, socialProfiles, instantMessageAddresses and dates can specify a label/identifier to delete only one entry.

Examples

Delete home address:

MBS( "CNContact.DeleteValue"; $contactID; "postalAddresses"; "home")

Delete all emails:

MBS( "CNContact.DeleteValue"; $contactID; "emailAddresses"; "")

Delete job title:

MBS( "CNContact.DeleteValue"; $contactID; "jobTitle")

See also

Release notes

Blog Entries

This function checks for a license.

Created 2nd March 2020, last changed 2nd March 2020


CNContact.AddURLAddress - CNContact.EditInAddressbook