- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:13 AM
We are getting the below error when trying to access survey in Service Portal. Can anyone help me on this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:27 AM
hello
If you open that assessment utils script include again you can see they are returning the glide record object
according to that code is it returning assessment instance glide record object for the logged in user
so check if there are any records for the logged in user in assessment instance table satisfying the query in the above function.
If not create one and check
PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:18 AM
Hello
can you post the server script here please ?
seems like there is a issue in server script
have you customised any thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:20 AM
Hi
Server Script:
(function() {
// populate the 'data' object
// e.g., data.table = $sp.getValue('table');
data.maxRecords = options.maxRecords || 5;
var sp = new SPSurveyAPI();
options.showAll = $sp.getParameter('id') == 'my_surveys';
if($sp.getParameter('id') != 'my_surveys'){
if(options.widgetTitle && options.widgetTitle.length>0){
data.widgetTitle = options.widgetTitle;
}else{
data.widgetTitle = gs.getMessage("My Assessments and Surveys");
}
data.encodedWidgetTitle = encodeURIComponent(data.widgetTitle);
} else{
data.widgetTitle = $sp.getParameter('title') || gs.getMessage("My Assessments and Surveys");
}
sp.getSurveys(data.maxRecords, options.showAll, data, true);
data.instances.forEach(function(instance) {
if (!!instance.description)
instance.description = $sp.stripHTML(instance.description);
var percentAnswered = parseInt(instance.percent_answered).toFixed(0) + '%';
instance.progress_text = gs.getMessage("{0} complete", percentAnswered);
});
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:27 AM
hello
If you open that assessment utils script include again you can see they are returning the glide record object
according to that code is it returning assessment instance glide record object for the logged in user
so check if there are any records for the logged in user in assessment instance table satisfying the query in the above function.
If not create one and check
PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 02:51 AM
Thank you so much