There is a JavaScript error in your browser console. In serviceportal i am getting the error.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
function onLoad() {
var parentsysID = g_form.getParameter('sysparm_parent_sys_id');
var parentTable = g_form.getParameter('sysparm_parent_table');
if (parentsysID && parentTable == 'incident') {
var ga = new GlideAjax("SetAffectedUser");
ga.addParam('sysparm_name', 'getAffectedUser');
ga.addParam('sysparm_inc_id', parentsysID);
ga.getXMLAnswer(function(response) {
if (response) {
g_form.setValue('requested_for', response);
}
});
}
}
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @SoumyasreeP ,
The error is happening because g_form.getParameter()
function onLoad() {
var urlParams = new URLSearchParams(window.location.search);
var parentsysID = urlParams.get('sysparm_parent_sys_id');
var parentTable = urlParams.get('sysparm_parent_table');
if (parentsysID && parentTable == 'incident') {
var ga = new GlideAjax("SetAffectedUser");
ga.addParam('sysparm_name', 'getAffectedUser');
ga.addParam('sysparm_inc_id', parentsysID);
ga.getXMLAnswer(function(response) {
if (response) {
g_form.setValue('requested_for', response);
}
});
}
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
but the above script is also not working.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @SoumyasreeP
Can you share the error/ error screen shot.
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago