Return to Navigation

Using Online Notifications

Online notifications functionality provides the ability for a user to create a notification manually and is implemented in the following Research Tracking components:

A consumer ID has been created for each of these components with their respective templates. The bind variables which are particular to these specific components are defined in generic templates. Online notifications support Email, Alert and SMS notification channels.

See Setting Up Online Notifications.

For further information about using online notifications, including the Create Notification page, see: Using Online Notifications.

Two generic pages are created:

  1. A subpage which has the Send Notification button. (No PeopleCode is present in this. Consumers have to write PeopleCode for this button to populate the notification context, consumer ID and Bind variable data which is specific to this component. A sample PeopleCode is given below.)

  2. A secondary page for selecting the values (channel, template, To, Cc, Bcc) and send notifications.

The PeopleCode for populating Consumer ID and the component specific data (that is, values for the template variables) is written at component record field (Send Notification) level in the fieldchange event. This PeopleCode varies from component to component because Consumer ID and template variables differs. Here is the sample code for the (Research Tracking) Service Request Management component. A component variable for notification context is created and consumer ID is populated.

import SCC_ADHOC_NTF:AdhocNotificationContext;
Component SCC_ADHOC_NTF:AdhocNotificationContext &adhoc;
&adhoc = create SCC_ADHOC_NTF:AdhocNotificationContext();
&adhoc.SCC_NTF_CONSUMER_ID = "SCC_NTF_CON_20130211040026";

Local Record &recdtl, &recPersonName;
Local string &RecipientEMPLID, &StudentName, &nRequestType, &nRequestSubtype, &nComment, &nStatus, &nReqCat, &URL, &instDesc, &typeDesc, &subtypeDesc, &statusDesc, &ssStatusDesc, &RecipientName, &catDesc, &ApproverName, &AssignedToName,&candNbr, &apprvID, &assgnTo, &reqDt, &actionDt, &effDt;;

&Emplid = SSR_RS_REQSTHDR.EMPLID.Value;
&Institution = SSR_RS_REQSTHDR.INSTITUTION.Value;
&nRequestType = SSR_RS_REQSTHDR.SSR_RS_RQUEST_TYPE.Value;
&nRequestSubtype = SSR_RS_REQSTHDR.SSR_RS_REQ_SUBTYPE.Value;
&ReqID = SSR_RS_REQSTHDR.SSR_RS_REQUEST_ID.Value;
&candNbr = SSR_RS_REQSTHDR.SSR_RS_CANDIT_NBR.Value;
&reqNmbr = SSR_RS_REQSTHDR.SSR_REQ_SEQUENCE.Value;
&reqstdtl = GetLevel0()(1).GetRowset(Scroll.SSR_RS_REQSTDTL);
&recdtl = &reqstdtl.GetRow(CurrentRowNumber()).GetRecord(Record.SSR_RS_REQSTDTL);
&ReqSeq = &recdtl.SSR_RS_REQ_SEQ.Value;
&RecipientEMPLID = &recdtl.SSR_RS_ASSIGNEDTO.Value;
     &nComment = &recdtl.SSR_RS_DESCRLONG.Value;
&nStatus = &recdtl.SSR_RS_STATUS.Value;
&apprvID = &recdtl.SSR_RS_APPRVR_ID.Value;
&assgnTo = &recdtl.SSR_RS_ASSIGNEDTO.Value;
&reqDt = &recdtl.SSR_RS_REQUEST_DT.Value;
&actionDt = &recdtl.SSR_RS_ACTION_DT.Value;
&effDt = &recdtl.EFFDT.Value;
&recPersonName = CreateRecord(Record.PERSON_NAME);
&recPersonName.EMPLID.Value = &Emplid;
If &recPersonName.SelectByKey() Then
   &StudentName = &recPersonName.NAME_DISPLAY.Value;
 End-If;

SQLExec("select name_display from %table(PERSON_NAME) where emplid=:1 ", &RecipientEMPLID, &RecipientName);
SQLExec("select name_display from %table(PERSON_NAME) where emplid=:1 ", &assgnTo, &AssignedToName);
SQLExec("select A.descr100, A.ssr_Rs_request_cat from PS_SSR_RS_REQSTTYP A where institution=:1 and ssr_Rs_rquest_type=:2 and %effdtcheck(SSR_RS_REQSTTYP ef1, A, %currentdatein)  ", &Institution, &nRequestType, &typeDesc, &nReqCat);
SQLExec("select A.descr100 from PS_SSR_RS_REQSTCAT A where A.institution=:1 and A.ssr_Rs_request_cat=:2 and %effdtcheck(SSR_RS_REQSTCAT ef1, A, %currentdatein)  ", &Institution, &nReqCat, &catDesc);
SQLExec("select A.descr50 from PS_SSR_RS_RQSUBTYP A where A.institution=:1 and A.ssr_Rs_rquest_type=:2 and A.ssr_Rs_req_subtype=:3 and %effdtcheck(SSR_RS_RQSUBTYP ef1, A, %currentdatein)  ", &Institution, &nRequestType, &nRequestSubtype, &subtypeDesc);

&adhoc.getParameterMap().Put("%1", &RecipientName);
&adhoc.getParameterMap().Put("%2", &RecipientEMPLID);
&adhoc.getParameterMap().Put("%3", &Emplid);
&adhoc.getParameterMap().Put("%4", &StudentName);
&adhoc.getParameterMap().Put("%5", &instDesc);
&adhoc.getParameterMap().Put("%6", "" | &ReqID);
&adhoc.getParameterMap().Put("%7", "" | &ReqSeq);
&adhoc.getParameterMap().Put("%8", &catDesc);
&adhoc.getParameterMap().Put("%9", &typeDesc);
&adhoc.getParameterMap().Put("%10", &subtypeDesc);
&adhoc.getParameterMap().Put("%11", &nComment);
&adhoc.getParameterMap().Put("%12", &statusDesc);
&adhoc.getParameterMap().Put("%13", &URL);
&adhoc.getParameterMap().Put("%14", &candNbr);
&adhoc.getParameterMap().Put("%15", &reqDt);
&adhoc.getParameterMap().Put("%16", &apprvID);
&adhoc.getParameterMap().Put("%17", &ApproverName);
&adhoc.getParameterMap().Put("%18", &assgnTo);
&adhoc.getParameterMap().Put("%19", &AssignedToName);
&adhoc.getParameterMap().Put("%20", &actionDt);
&adhoc.getParameterMap().Put("%21", &effDt);
&adhoc.getParameterMap().Put("%22", "" | &reqNmbr);
DoModalS(Page.SCC_NTF_ADHOC, "", 0, 0);

Following is a sample notification setup for online notifications:

Image: Notification Setup Page

This example illustrates the fields and controls on the Notification Setup page.

Notification Setup Page

Image: Generic Template Definition Page for NFK

This example illustrates the fields and controls on the Generic Template Definition Page for NFK

Generic Template Definition Page for NFK