gs.getSessionID() is throwing an error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
var sessionID = sn_fd.GlideActionUtil.setEncryptedOutput(util.getSessionId());
if (typeof sessionID === 'string' && sessionID == '') {
throw new Error("Invalid Connection & Credential Alias.");
} else {
outputs.session_id = sessionID;
}
The above lines of code are used in a script step in a Data stream.
If the session ID is empty, we are throwing an error. why would be the session ID be empty when the subflow runs as system and how can we resolve it ?
Thanks in Advance !!
The above lines of code are used in a script step in a Data stream.
If the session ID is empty, we are throwing an error. why would be the session ID be empty when the subflow runs as system and how can we resolve it ?
Thanks in Advance !!
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Would need to see the entire script. Is util defined?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what's your business requirement?
where is this script written
some screenshots
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
@Ankur Bawiskar , @Brad Bowman , Thanks for your Reply
We are using this in a flow designer Data stream
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
we don't know what input you are passing to that function
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
