Absent Member.
Absent Member.

Related Actions rule set in PD

Hi Guys,

I am working on a requirment like when a problem ticket is resolved it shoud automatically send  notifications to all related incident contact person.

I am trying to run this using PD "Run Action on Related Records" rule set. I can use the Incident values in the notification, but i am not able to refer or use the problem ticket number (Source record) in the Notifications.

Can someone help me how this can be achieved in PD .



1 Reply
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Related Actions rule set in PD

You should be able to accomplish this with a Run JavaScript rule type in the transition from the last open phase to the closure phase. I haven't tested this and just whipped it up over some coffee, but I think should do the trick:

var to = new Array();
var rel = new SCFile("screlation");
var relRc = rel.doSelect("source=\"" + record.number + "\" and depend.filename=\"probsummary\"");

while (relRc == RC_SUCCESS) {//start loop

   var im = new SCFile("probsummary");
   var imRc = im.doSelect("number=\"" + rel.depend + "\"");
   if (imRc == RC_SUCCESS) {

   relRc = rel.getNext();}//end loop

if (to != null) {//start notification call

   vars.$relatedRecipients = to;
   var ret = new SCDatum();
   var rteNames = new SCDatum();rteNames.push("name");rteNames.push("record");
   var rteValues = new SCDatum();rteValues.setType(8);

   rteValues=system.functions.insert(rteValues, 0, 1, "NAME OF YOUR NOTIFICATION");
   rteValues=system.functions.insert(rteValues, 0, 1, record);


   }//end notification call

Make sure that the recipient in your notification is set to $relatedRecipients.

Caveat: My main customer isn't using PD yet :(, so I haven't done too much JS in PD - therefore, I'm not sure if you should use record or $L.file, so you might try the other if one doesn't work.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.