Where is SNC.AssessmentCreation() ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 07:05 AM
I am trying to understand the below piece of code especially the first line in which an object is created. I understand it is creating a new assessment i don't understand below points.
1. Where is the AssessmentCreation()(i believe script include) is written? In my Script Include of my instance(Eureka) it is not available and how do i view the code written in AssessmentCreation() ?
2. What is the objective of SNC. ?
3. Can an admin in ServiceNow edit AssessmentCreation() ?
(new SNC.AssessmentCreation()).conditionTrigger(current, 'f4faa78a2b53e100e653224e59da157c');
if(flag){
var gropen = new GlideRecord('asmt_assessment_instance');
gropen.addEncodedQuery(surveys);
gropen.query();
while(gropen.next()){
gropen.state = 'ready';
gropen.update();
}
}
t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2017 04:35 AM
Hi Chuck,
I have received below response from the Andy Venables, solution architect with the TPP team.
Having reviewed your issue (and associated community post), i believe the SNC.AssessmentCreation() is no longer intended to be called directly.
Instead a script include called AssessmentUtils is provided that acts as an interface for assessment functions. Specifically there is a "createAssessments" function that actually calls the underlining java code, because this script include is defined in global it acts as an interface for your scoped app.
I think you should be able to replace your code with the following:
new global.AssessmentUtils().createAssessments('c88c31a3dbee8340070cd001cf9619a5','',current.employee_name);
One other factor to consider is that it is intended (in normal operation) that you shouldn't need to call these APIs as assessments are designed to be script free. However there maybe aspects of your case that require it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2022 05:20 AM
Thanks for sharing