Send email through JS after update ess call (185 Views)
Reply
Frequent Advisor
Luciano80RJ
Posts: 57
Registered: ‎07-29-2010
Message 1 of 3 (185 Views)

Send email through JS after update ess call

Hi,

 

I want send a email notification to a assignment group when the end user update the ess call.

I've tried through of notifications and macro and without success.

I put a JS in display options "cc.edit.incident" on the Save & Exit button because this action changes the Incident Status from Pending Customer to Open, but I want to notify the assignment group:

 

var file = system.vars.$file;
var imid = file.incident_id;

var Vrel = new SCFile('screlation');
var Srel = Vrel.doSelect("source=\""+ imid +"\" and depend.filename=\"problem\" and depend.active=\"true\"");

if (Srel == RC_SUCCESS)
{
var incid = new SCFile('probsummary');
var selincid = incid.doSelect("number=\""+Vrel.depend+"\" and problem.status=\"Pending Customer\"");
if (selincid == RC_SUCCESS)
{

incid.problem_status = "Open";
incid.doUpdate();
print("The incident "+Vrel.depend+" has been update, it status is Open now.");

}
else
{
print("Ocorreu um erro ao processar!");

}

}

 

How could I do it?

Please use plain text.
Honored Contributor
Piku
Posts: 3,908
Registered: ‎06-17-2010
Message 2 of 3 (178 Views)

Re: Send email through JS after update ess call

You should use the notification for this purpose. What is the issue you are getting in this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assign Kudo, if found post useful and mark it accepted if solves the issue.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Please use plain text.
Frequent Advisor
Luciano80RJ
Posts: 57
Registered: ‎07-29-2010
Message 3 of 3 (173 Views)

Re: Send email through JS after update ess call

Because the update action is in Interaction, when the end-user does an update the interaction, the Incident changes it status automatically to "Open", through this JS.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation