- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 04:34 PM
Hi Experts,
I'm having issues with an inbound action I created for a custom CI Class (u_cmdb_ci_certificates). I understand there's already a cert class, but I'm testing this for something else.
To Summarize: I have an inbound action to update the state of the CI and add comments. The target record is getting populated in the email log, but I'm receiving the error "did not create or update u_cmdb_ci_certificates using current."
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
// Implement email action here
processRetireCert();
function processRetireCert() {
current.comments = "reply from: " + email.from + "\n\n" + email.body_text;
current.u_state = 'retired';
current.update;
}
})(current, event, email, logger, classifier);
The reply email subject includes the sysid for the record in the subject line, and the watermark. The inbound action is getting triggered.
I'm having trouble figuring out what I'm doing wrong. Any assistance would be greatly appreciated.
Note: I was able to get this to work using the field actions, so I assume there's something wrong with my script.
Thank you,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 06:22 PM
If you want to update the record, you should call the update function:
current.update();
instead of just dumping a reference to it:
current.update;
To be clear, it is about ()
being there or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 06:16 PM
Hello,
Is the state field really: u_state?
I would imagine it's an out of box state field and thus would be called "state" not "u_state".
So in your script, it could be causing errors there.
It's always best to add log statements in scripting such as: gs.info("sample log entry"); etc. so you can see what you're doing, if the function is being accessed, what values you may be getting etc. else you're just coding in the dark...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 06:22 PM
If you want to update the record, you should call the update function:
current.update();
instead of just dumping a reference to it:
current.update;
To be clear, it is about ()
being there or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 04:08 PM
Thank you! I completely overlooked that - everything is working as intended now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 04:13 PM
You're welcome and I'm glad everything is working. Also, appreciate the feed-back! 🙂