Notify

You can use this function for Optiva Workflows and Copy Methods.

Purpose

The function Notify sends an email message to Optiva users.

You can configure an email group in Outlook mail. See the Infor PLM for Process Application Configuration Guide.

Syntax


long Notify(string addressee, string template, int mode, int addresseeType, params string[] args)

Return Value

If the code is successful a value one (1) is displayed or else fails.

Arguments

Part Description
Addressee (User/Group/Role) If the code is successful a value one (1) is displayed or else fails.
Template The code of the Email template form to be used, this defines the message format and content.
Mode The delivery method of the Email template such as External SMTP. By default, the value is 1
Adressee (User/Group/RoleIndicator)

Optional. The numeric code that tells the system what type of recipient you are sending message to.

Values to be used are :

  • >"0" for User,
  • "2" for Group,
  • "1" for Role.
param1,param2 Optional. The additional parameters to customize the message content dynamically. In the template code, refer to the variable as [%n], where n is the number of the custom parameter.

Description

Notify sends an email message to a user, all users in a group or all users of a role. The message is sent through an external email package that is SMTP compliant. When you run an action set with the Notify function, emails are only sent to users that do not have Deactivate Email selected. You must set up the Optiva profiles to use an external email package in workflow notifications. See the Infor CloudSuite PLM for Process Application Configuration Guide for the appropriate values. External notification requires the SMTP process on the Application server.

Notify sends messages to specific users, groups, or roles by their user names, group name, or role code. Messages can be sent to global users too. The messages are sent according to the individual's position in the workflow. For example, a lab director can require notification each time a formula is approved and sent to the director’s user name or a group. Or a message can be sent to the person who began the workflow, using the global variable _STARTUSER ; or to the person who clicked the button on the action, using the global variable _SOURCEUSER.

Examples

This example determines to notify the user (FSI) about the reference’s removal.

int rtnval = Workflow.RemoveReferences("", "", refSymbol, refObject);
	if (rtnval >= 0)
	{
		MessageList("References is removed for " + refSymbol + " with reference object " + refObject);
		long rc = Notify("FSI", "REFERENCE_REMOVAL_NOTIFY", 1, 0);
}

Arguments

Part Description
Addressee (User/Group/Role) FSI
template The code of the Email template form to be used, this defines the message format and content.
Mode REFERENCE_REMOVAL_NOTICE
Adressee 1
param1,param2 0