did not create or update sc_req_item using current in inbound email action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 01:03 AM
HI Team,
I want to trigger a notification from the inbound email action.It's not working,Can anyone suggest me why it is not working.
Here is my script:
var ritmNo ='';
var sub=email.subject;
var req='';
var index = sub.indexOf("RITM");
var end = 11; //length of ritm
if(index > -1) {
end = index+end;
ritmNo = sub.substring(index, end).trim();
gs.log(ritmNo);
}
//if (current.getTableName() == "sc_req_item") {
//if (email.subject.toLowerCase().indexOf("RITM") > -1)
// if(email.from_sys_id == current.u_requested_for)
// {
// req= current.u_requested_for;
// }
var body=email.body_text;
var boo=[];
boo=body.split('________________________________');
var gr=new GlideRecord('sc_req_item');
gr.addActiveQuery();
gr.addQuery('number',ritmNo);
gr.query();
if(gr.next())
{
//gs.eventQueue('Test Email',gr,email.from,finalVal);
if(email.from_sys_id == gr.u_requested_for)
{
req= gr.u_requested_for;
}
var finalVal=sub+"|"+boo[0]+"|"+req;
gs.eventQueue('Test Email',gr,email.from,finalVal);
}
// req=gr.u_requested_for;
//gs.eventQueue('Test Email',current,email.from,finalVal);
gs.log("tttttttttt"+boo[0]);
//current.update();
//}
In email Log.
I changed current also but still i am getting same error.
- Labels:
-
Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 01:08 AM
Hi,
Have a look below it may help you
https://hi.service-now.com/kb_view.do?sysparm_article=KB0746934
https://hi.service-now.com/kb_view.do?sysparm_article=KB0547763
Please Mark Correct/Helpful answer if it help you in any way.
Thanks,
Kunal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 01:18 AM
Hi kunal,
Thanks for the quick response.
No Use with the KB articles.
Thanks,
Uma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2021 12:47 PM
Hello Uma,
Were you able to find any solution to this problem?
Best Regards,
Amit