- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2020 11:53 PM
Hi Team,
My inbound email action is triggering but it is not updating the variable. Can you spot where I am going wrong. Below is the script.
The line "current.variables.more_information_required = info_provided" is not working though comments are getting updated properly.
gs.include('validators');
if (current.getTableName() == "sc_req_item") {
current.variables.more_information_required = info_provided;
current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.update();
event.state="stop_processing";
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 12:22 AM
Hi,
If its the value and not the label then put it inside single quotes and test it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 12:34 AM
give the select box value in quotes properly
There is this OOB business rule on sc_req_item which restricts the variable update on RITM table
It is blocking the update possibly
Name: Disallow variable edit on RITM
URL: https://instanceName.service-now.com/nav_to.do?uri=sys_script.do?sys_id=d3a6ded24f331200fc11fa218110c771
Updated script
gs.include('validators');
if (current.getTableName() == "sc_req_item") {
current.variables.more_information_required = 'info_provided'; // give proper variable value here
current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.setWorkflow(false); // this will avoid triggering BR but it won't audit the update
current.update();
event.state="stop_processing";
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader