Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2026 07:07 AM
you didn't do it properly in script
the error clearly says you should set either success or fail in your script
(function executeStep(inputs, outputs, stepResult, timeout) {
var sysId = inputs.u_sysid;
var tableName = inputs.u_tablename;
var gr = new GlideRecord(tableName);
gr.addQuery("sys_id", sysId);
gr.query();
if (gr.next()) {
outputs.u_number = gr.getDisplayValue();
stepResult.setOutputMessage("The number found.");
// Set the official step status to success
stepResult.setSuccess();
} else {
// Fallback or explicit failure logic
stepResult.setOutputMessage("Something went wrong.");
stepResult.setFailed();
}
}(inputs, outputs, stepResult, timeout));
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader