How to access new SNC.AssessmentCreation() which is in script include to Widget Server script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
How to access new SNC.AssessmentCreation() which is in script include to Widget Server script which is in Knowledge management Service Portal scope. I am getting empty value in script, unable to fetch script include in widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
it's scope issue, AssessmentCreation is in global scope and seems your widget is in another scope
see this
How can I call SNC.AssessmentCreation()).createAssessments in scoped app?
Workaround
-> create script include in global scope, accessible from ALL Scopes and that will call the Assessment API
-> call this script include of global from your widget
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I am already creating script include in global and accessible from all scope.
can it be cross-scope application issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
so from widget you are calling that global script include?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago - last edited 5 hours ago
yes, I want to fetch assessmentId and surveyID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @mrunalnikhi ,
Is this widget in another scope like not in global ?. If not in global try to call new global.CESKBSurveyUtil(); and also check the sandbox is unchecked for that script include