SNC not defined in scope app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2019 09:23 PM
I am using the following snippet to initiate the creation of a survey instance:
new SNC.AssessmentCreation().addRecentAssessor(new_user);
var instanceId = "";
if (type_id != "" && source_id != "") //This is an assessable record
instanceId = new SNC.AssessmentCreation().createAssessments(type_id, source_id, new_user);
else // This is a survey or a metric type
instanceId = new SNC.AssessmentCreation().createAssessments(asmtr_sys_id, "", new_user);
This works in Global scope, but in my scoped app, i get an error:
java.lang.SecurityException: Invalid object in scoped script: [object SNC]
I've tried to append a global. prefix so it looks looks like global.SNC, but I still get the same error.
Any ideas? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2019 10:42 PM
Hi,
hope below link will help you in doubt:
https://community.servicenow.com/community?id=community_question&sys_id=3451d32ddbdcdbc01dcaf3231f961975
https://community.servicenow.com/community/hr/Machine%20generated%20alternative%20text:%20Entry%20%20Column%20nam8%20%20Max%20lengthL%20%20Reference%20typ8%20%20Choic8%20%20Required%20field%20%20Change%20Request%20(change%20requestl%20%20u%20reminder%20%20Date/community?id=community_question&sys_id=3a82b6fedbb26b80f0612183ca961959
NOTE: Mark correct or helpful if it helps you.
Warm Regards,
Raj patel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2019 06:27 AM
Hi Raj,
Good thinking, but I don't believe the SNC script include is visible or can be altered in any way. It's a core ServiceNow script.