SendNotificationEx
Description
Send a Notification with additional customization of the Notifications Processor, this method allows additional customization of the Notifications Processor by passing a Options object to this method.
A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information
Syntax
Sub SendNotificationEx(userID as integer, objVer as ObjVer, options as Options, LogIdentifier As Object)
Parameters
Name |
Data Type |
Description |
User Id |
integer |
ID of current M-Files user |
objVer |
ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer") |
|
Options |
A Settings object, used to further customize the behavior of the Notifications Processor when creating new notifications |
|
LogIdentifier |
String or TypedValue |
Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated. |
Return
None
Example
'create PentagonDOCS Notification object
Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")
'create a list of users to send to
Dim usersOrGroups : Set usersOrGroups = CreateObject("MFilesAPI.UserOrUserGroupIDs")
Dim UserID: Set UserID = CreateObject("MFilesAPI.UserOrUserGroupID")
UserID.UserOrGroupID = 31
UserID.UserOrGroupType = 1 ' User account type
usersOrGroups.add -1,UserID 'add user Id's and group ID's to the collection
'create a settings object
Dim mySettings : Set mySettings = ExDOCSNotification.GetNotificationSettingsObject()
mySettings.AttachFiles = true 'attach files from the objVer to the Notification
mySettings.template = "default" 'use the default Notification template
mySettings.SendToUsersOrUserGroups = usersOrGroups
'call sendNotificationEx
ExDOCSNotification.SendNotificationEx CurrentUserID.Value, objVer, mySettings, ActivityID