UserNotification.SetIdentifier
------------------------------

Sets the identifier used to uniquely identify a notification.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [UserNotification](component_UserNotification.md) | [3.5](newinversion35.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "UserNotification.SetIdentifier"; UserNotificationReference; Identifier ) 

**MBS**( **"UserNotification.SetIdentifier";** /\* Sets the identifier used to uniquely identify a notification. \*/  
**$UserNotificationReference**; /\* An user notification reference.e.g. $ref \*/   
**$Identifier**) /\* The new identifier.e.g. "id1234" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| UserNotificationReference | An user notification reference. | $ref |
| Identifier | The new identifier. | "id1234" |

### Result

Returns OK or error.

### Description

Sets the identifier used to uniquely identify a notification.   
A notification delivered with the same identifier as an existing notification will replace that notification, rather than display a new one.  
Requires macOS 10.9.  
### See also

- [UNNotification.Identifier](UNNotificationIdentifier.md)
- [UNNotification.ThreadIdentifier](UNNotificationThreadIdentifier.md)
- [UserNotification.GetIdentifier](UserNotificationGetIdentifier.md)
- [UserNotification.SetSoundName](UserNotificationSetSoundName.md)
- [UserNotification.SetSubTitle](UserNotificationSetSubTitle.md)
- [UserNotification.SetUserInfo](UserNotificationSetUserInfo.md)

This function is free to use.

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

  
[UserNotification.SetHasReplyButton](UserNotificationSetHasReplyButton.md) - [UserNotification.SetInformativeText](UserNotificationSetInformativeText.md)

[HTML Version](UserNotificationSetIdentifier.shtml)