How to use FlowScriptAPI.getContextID() in script includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
How to use FlowScriptAPI.getContextID() in script includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
What is your use case??
You can check servicenow documentation : https://www.servicenow.com/docs/r/api-reference/server-api-reference/FlowScriptAPI.html
The FlowScriptAPI API provides a method to return the context ID of the running flow.
You cannot instantiate objects of this type. Objects of this type are created automatically and are accessible only in script steps and inline scripts.
FlowScriptAPI - getContextID()
Returns the context ID of the running flow.
ParametersName Type Description| None |
| String | The sys_id of the running flow. |
This example assumes you have created a flow containing a Log action. This inline script generates the content of the Log message.
var contextId = FlowScriptAPI.getContextID(); return contextId;
4ecead85c4da0010598d0c7c6bf73554
Also check: https://www.servicenow.com/community/developer-forum/access-a-flow-action-quot-variables-quot-from-a...
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
