Highlighted
Super Contributor.
Super Contributor.
187 views

How to add assignment group as recipient on this javascript

Hello Expert,

 

I would like to know that how can i add assignment group as recipient.. for example:

Notification will be send to jinesta@hpe.com and all of members assignment group Service Desk.

 

I got this following script from https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM02203783.. but I need to customize this script.. Appreciate for anything help..

function sendEmail( recipient, subject, emailBody ) {
var email = new SCFile("mail");

email["user.to"] = recipient;
email["user.from"] = system.functions.operator();
email["date.to.send"] = system.functions.tod();
email["status"] = "sent";
email["subject"] = subject;
email["application"] = "email";
email["text"].push(emailBody);
email["user.array"][0] = recipient;

var paramNames = new SCDatum();
var paramValues = new SCDatum();

paramNames.push("record");
paramValues.push(email);

var rteReturnValue = "";
var rc = system.functions.rtecall("callrad",
rteReturnValue,
"axces.email", //RAD app name
paramNames,
paramValues,
false); //false to run in same thread, true to run in new thread

return rc;

}

function htmlsend()
{

var record = new SCFile("cm3r",SCFILE_READONLY);
record.doSelect("number=\"C10001\"");
var recipient = "jinesta@hpe.com";
var htmlTemplateName = "ChM Change Update";
var subject = lib.htmlemailtemplates.getMailHeader(htmlTemplateName, record, record, recipient, "en");
var emailBody = lib.htmlemailtemplates.getMailBody(htmlTemplateName, record, record, recipient, "en" );
var rc = sendEmail( recipient, subject, emailBody );

}
htmlsend();
0 Likes
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.