
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2015 08:27 AM
I am having difficulties setting my location field for Incidents using inbound email actions.
I use inbound email to create and set fields often, but have never used the location table as a field to set. I do notice that all the other fields I am setting are on the incident table, and the location ID is on the task table. I assume I need something else in the script to reference to another table?
Any help is appreciated. Everything sets fine except location.
- current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
- current.short_description = email.subject;
- current.contact_type.setDisplayValue ("email");
- current.assignment_group.setDisplayValue ("Supply Chain Systems");
- current.category.setDisplayValue ("Application");
- current.opened_by.setDisplayValue ("StoreOps");
if (email.body.store != undefined)
current.location = email.body.store;
if (email.body.sn != undefined)
current.caller_id = email.body.sn;
- current.insert();
- event.state="stop_processing";
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2015 08:29 AM
Hi Mark,
For your location line I would try:
current.location.setDisplayValue(email.body.store);
The location is expecting a sys_id, so you have to tell it you're giving it the display value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2015 08:29 AM
Hi Mark,
For your location line I would try:
current.location.setDisplayValue(email.body.store);
The location is expecting a sys_id, so you have to tell it you're giving it the display value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2015 09:29 AM
I feel a little stupid. It works and thank you very much!
I thought about it, then thought why would I do this when the caller_id part works which is also a reference field.
For my learning would you explain why the below works on the caller_id, and not on location, and if I should also make this change on the caller_id part?
if (email.body.sn != undefined)
current.caller_id = email.body.sn;