NOTIFYUSER
Name | NOTIFYUSER |
---|---|
Description | Used for creating notifications with a specific text for the object that triggered the business rule. These notifications will later be sent to users indicated in the rule by the Notifications system. The action creates a record in the Notifications table for each user specified in Parameter1: UserId = the Id of the user in Parameter1 ValueSubject = Parameter2 ValueNotificationClass = Parameter3 DataObject = the EDO of the aggregate root of the entity for which the rule has been triggered. if empty - set a default value 'BR' + '_ ' + 'UserBusinessRule.Code', e.g. 'BR_0005' For more info, see Aggregates and EDO. If there aren't explicitly created notification settings for the class specified in Parameter3, the notification will only be sent as an in-app notification. IMPORTANT: NOTIFYUSER is not compatible with all events. For more info, see the Compatible events chart section below. |
Parameter 1 | The user(s) for which a notification will be created. You can set either the UserId or the user's login. If there's more than one recipient, they can be entered in a comma-separated list which must contain only UserIds (Id1,Id2,...IdN) or logins (Login1,Login2,...LoginN). |
Parameter 1 type | Guid, String, List |
Parameter 2 | The text displayed in the notification. |
Parameter 2 type | String // usually used in combination with formatted string |
Parameter 3 | (Optional) The class which will be set for the notification. It must meet the format specified in R35312 Notifications - Validate Notification Class If the parameter isn't explicitly set, a default value will be used instead: 'USR' + '_' + 'BR' + '_' + 'UserBusinessRule.Code', e.g. 'USR_BR_0005'. For more information about classes, see Notifications. |
Parameter 3 type | String |
Examples | see the Example section below |
Version | Introduced in: 2020.1 |
Compatible events chart
NOTIFYUSER is not compatible with all events.
Event type | Compatibility with NOTIFYUSER |
---|---|
Client commit (e.g. CLIENTCOMMIT, AGGREGATECLIENTCOMMIT) | compatible |
Document events - (e.g. STATECHANGING, STATECHANGED, VOIDING) | compatible |
Commit (e.g. COMMIT) | incompatible// NOTIFYUSER will create a notification which will be displayed on the next login into the program. |
Front-end (e.g ATTRIBUTECHANGING, ATTRIBUTECHANGED) | incompatible// NOTIFYUSER won't create a notification. |
Example:
А business rule creates a notification for а sales person when one of their sales orders has been released.
Repository | |||||||
---|---|---|---|---|---|---|---|
Crm.Sales.SalesOrders | |||||||
Events | |||||||
Event type | Event parameter | Execution priority | |||||
Change of state | RELEASED | Normal | |||||
Actions | |||||||
Action No | Action type | Parameter1 type | Parameter1 value | Parameter2 type | Parameter2 value | Parameter3 type | Parameter3 value |
1 | NOTIFYUSER | Attribute | SalesPersonId | Formatted string | sales order {DocumentNo} has been released. | Constant | USR_SALESPERSON_SORELEASED |