Notification method: notification classes class
Syntax
Notification(NotifyFrom, dttmCreated, language_cd)
Description
Use Notification to instantiate a notification object.
Parameters
| Parameter | Description |
|---|---|
|
NotifyFrom |
Specify the entity the notification is being sent from, as a string. Avoid overusing generic entities with this parameter, as this value, along with the value for dttmCreated are the key to understanding where notifications originated from. |
|
dttmCreated |
Specify the date and time the notification is being sent, as a DateTime value. Note: To ensure a unique timestamp for each notification that is sent, you must pass a DateTime value that includes milliseconds. Because the %Datetime system variable always returns 0 for the milliseconds value, use the combination of %Date+%PerfTime instead. |
|
language_cd |
Specify the 3-character language code of the current user, as a string. |
Returns
A Notification object.
Example
To ensure a unique timestamp for each notification that is sent, you must pass a DateTime value that includes milliseconds to the dttmCreated parameter. Because the %Datetime system variable always returns 0 for the milliseconds value, use the combination of %Date+%PerfTime instead.
import PT_WF_NOTIFICATION:*;
import PT_WF_WORKLIST:*;
Local PT_WF_NOTIFICATION:Notification &MyNotify;
&MyNotify = create PT_WF_NOTIFICATION:Notification("Workflow_Admin", ⇒
%Date + %PerfTime, %Language);
Related Topics