Getting an error "submit canceled due to a script error - please contact your system administrator"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 02:55 AM
Hi All
Non admin users are getting an error "submit canceled due to a script error - please contact your system administrator" while clicking on save/update after filling the variables(present on multirow variable set) under Details & Variables section on catalog task(sc_task).
I have written the below onSubmit script in order to restrict the duplicate entries on a Multi Row Variable set.
function onSubmit() {
var value = parent.g_form.getValue("name of the MRVS");
var arr = JSON.parse(value);
var totalLength = arr.length;
var arr2 = [];
for (var i = 0; i < arr.length; i++) {
if (!searchExisting(arr[i].variable_name_to_be_unique, arr2)) {
arr2.push(arr[i]);
}
}
var finalObjLength = arr2.length;
if (finalObjLength != totalLength) {
alert('There are duplicates in host names please remove those before submitting');
return false;
}
}
function searchExisting(variable_name_to_be_unique, newArray) {
for (var i = 0; i < newArray.length; i++) {
if (newArray[i].variable_name_to_be_unique == variable_name_to_be_unique) {
return true;
}
}
return false;
}
So my question is , why non admin users are getting that error and is my script causing that error ?
Could you please provide me solution that how can we resolve this issue ?
Thanks in advance
Nagurbi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi Nagurbi,
Have you ever found a fix for this issue?
Regards,
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 09:10 AM
e same issue - was this resolved?