Highlighted
New Member.
392 views

Auto create related incident if work.assessment=3.

Jump to solution

Hello.

Costumer wants:

If user on ESS portal close his interaction with work.assessment=3 on form ess.SD.close.survey, SM must create related incident with assignment=XXX, description=YYY and e.t.c..

 

Can someone help with it?

0 Likes
1 Solution

Accepted Solutions
Highlighted
New Member.

Resolved by trigger.

 

var Incident=new SCFile("probsummary");
var relint=new SCFile("screlation");

record=system.vars.$L_file;
recordsave=system.vars.$L_file_save;
if (record.work_assessment==3 && record.work_assessment!=recordsave.work_assessment)
{

// Поля в вудущем инциденте
Incident.assignment="GROUP";
Incident.category="CATEGORY";
Incident.subcategory="SUBCATEGORY";
Incident.brief_description="COMMENT " + record.incident_id + " COMMENT2";

// Поля переносимые из обращения
Incident.action=record.user_comments;
Incident.affected_item=record.affected_item;
Incident.company=record.company;
Incident.priority_code=record.priority_code
Incident.functional=record.functional;
Incident.oper_bizdesc=record.oper_bizdesc;
Incident.contact_name=record.contact_name;
Incident.callback_contact=record.callback_contact;
Incident.product_type=record.product_type;
Incident.problem_type=record.problem_type;
Incident.initial_impact=record.initial_impact;
Incident.severity=record.severity;
Incident.location=record.location;
Incident.dept=record.dept;
Incident.contact_name=record.contact_name;
Incident.location=record.location;
Incident.dept=record.dept;
Incident.incident_id=record.incident_id;
Incident.logical_name=record.logical_name;
var result= Incident.doAction("add");
var d = new XMLDate( new Date() );


relint.source=record.incident_id;
relint.source_filename="incidents";
relint.depend=Incident.number;
relint.depend_filename="problem";
relint.source_active="t";
relint.depend_active="t";
relint.sysmoduser="falcon";
relint.sysmodtime=d;

relint.doInsert();


if(result==RC_SUCCESS)
{
print("Ваша жалоба принята.");
//return result;
}
else
{
print("Error...");
//return "Error";
}
}

 

View solution in original post

0 Likes
2 Replies
Highlighted
New Member.
Some ideas?
0 Likes
Highlighted
New Member.

Resolved by trigger.

 

var Incident=new SCFile("probsummary");
var relint=new SCFile("screlation");

record=system.vars.$L_file;
recordsave=system.vars.$L_file_save;
if (record.work_assessment==3 && record.work_assessment!=recordsave.work_assessment)
{

// Поля в вудущем инциденте
Incident.assignment="GROUP";
Incident.category="CATEGORY";
Incident.subcategory="SUBCATEGORY";
Incident.brief_description="COMMENT " + record.incident_id + " COMMENT2";

// Поля переносимые из обращения
Incident.action=record.user_comments;
Incident.affected_item=record.affected_item;
Incident.company=record.company;
Incident.priority_code=record.priority_code
Incident.functional=record.functional;
Incident.oper_bizdesc=record.oper_bizdesc;
Incident.contact_name=record.contact_name;
Incident.callback_contact=record.callback_contact;
Incident.product_type=record.product_type;
Incident.problem_type=record.problem_type;
Incident.initial_impact=record.initial_impact;
Incident.severity=record.severity;
Incident.location=record.location;
Incident.dept=record.dept;
Incident.contact_name=record.contact_name;
Incident.location=record.location;
Incident.dept=record.dept;
Incident.incident_id=record.incident_id;
Incident.logical_name=record.logical_name;
var result= Incident.doAction("add");
var d = new XMLDate( new Date() );


relint.source=record.incident_id;
relint.source_filename="incidents";
relint.depend=Incident.number;
relint.depend_filename="problem";
relint.source_active="t";
relint.depend_active="t";
relint.sysmoduser="falcon";
relint.sysmodtime=d;

relint.doInsert();


if(result==RC_SUCCESS)
{
print("Ваша жалоба принята.");
//return result;
}
else
{
print("Error...");
//return "Error";
}
}

 

View solution in original post

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.