Inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 03:25 AM
Hi All,
I have created a inbound action to create requested items. with the following condition "email.to.indexOf("abc@xyz.com") > -1". While testing by sending an email to "abc@xyz.com", the inbound action got skipped and the target is empty in email logs, but requested item got created with the subject of the email. So please help me in trouble shooting this issue.
email.to.indexOf("abc@xyz.com") > -1
Script used to create ritm:
var myCart = new Cart(null,current.u_requested_for.sys_id);
var CatItem = new GlideRecord('sc_cat_item');
CatItem.addQuery('name','Xyz');
CatItem.query();
if(CatItem.next()){
var myItem = myCart.addItem(CatItem.sys_id);
myCart.setVariable(myItem,'requester',gs.getUserID());
myCart.setVariable(myItem,'Short_Description',email.subject);//email.body.description
myCart.setVariable(myItem,'Description',email.body_text);
myCart.setVariable(myItem,'cat_assignment_group', 'xyz' );
var myOrder = myCart.placeOrder();
myOrder.requested_for = gs.getUserID();
myOrder.insert();
}
Thanks,
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 03:29 AM
Hi All,
I have created a inbound action to create requested items. with the following condition "email.to.indexOf("abc@xyz.com") > -1". While testing by sending an email to "abc@xyz.com", the inbound action got skipped and the target is empty in email logs, but requested item got created with the subject of the email. So please help me in trouble shooting this issue.
Target table: sc_req_item
Action type: Record action
Type: New
Condition: email.to.indexOf("abc@xyz.com") > -1
Script used to create ritm:
var myCart = new Cart(null,current.u_requested_for.sys_id);
var CatItem = new GlideRecord('sc_cat_item');
CatItem.addQuery('name','Xyz');
CatItem.query();
if(CatItem.next()){
var myItem = myCart.addItem(CatItem.sys_id);
myCart.setVariable(myItem,'requester',gs.getUserID());
myCart.setVariable(myItem,'Short_Description',email.subject);//email.body.description
myCart.setVariable(myItem,'Description',email.body_text);
myCart.setVariable(myItem,'cat_assignment_group', 'xyz' );
var myOrder = myCart.placeOrder();
myOrder.requested_for = gs.getUserID();
myOrder.insert();
}
Thanks,
Ram

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 11:59 AM
You probably have already solved this, but your condition should be email.recipients.indexOf("abc@xyz.com") > -1