
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 07:47 AM
I need to set catalog variable when an inbound email action occurs. I've tried various scripting syntax and failed each time. Im trying to set a check box on the catalog item already submitted to True when this script processes.
Type: CheckBox
Question: Department created on PS
Name: Department_created_PS
Cat Item: General Accounting New Department
____________________________________________________________________________
When the inbound action is triggered here is the script after trying many versions.
- gs.include('validators');
if (current.getTableName() == "sc_req_item") {
current.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.u_Department_created_PS = "true";
current.update();
- event.state="stop_processing";
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 08:35 AM
Mark,
Can you try this line:
current.variables.Department_created_PS = true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 07:50 AM
Mark,
If its a Catalog Variable, you need to do something like:
if (current.getTableName() == "sc_req_item") {
current.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.variables.Department_created_PS = "true";
current.update();
event.state="stop_processing";
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 08:15 AM
if (current.getTableName() == "sc_req_item")
{ current.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.variables.Department_created_PS = "true";
current.update();
event.state="stop_processing";
I changed to this, and it processes but does not check the box as true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 08:35 AM
Mark,
Can you try this line:
current.variables.Department_created_PS = true;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 09:20 AM
No luck.
I don't think gs.include would have anything to do with the failure, but I have to keep that in for the inbound action to process.
gs.include('validators');
if (current.getTableName() == "sc_req_item") {
current.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;
current.variables.Department_created_PS = true;
current.update();
event.state="stop_processing";
}