Hi i am calling script include from client but it was showing "type" error in my code please give me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Greetings,
I believe the issue is that it is expecting a comma at the end of your function. Can you try adding a comma after the ending bracket in line 11?
Before:
}
type:
After:
},
type:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
your script include syntax is wrong.
Please correct that by following ServiceNow Docs
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
And if it helps, here is a link to some of that ServiceNow documentation which will discuss syntax and provide good examples.
Script includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @aswini bc
wirte a comma "," in the line 11.
From
}
To
},
And let me know if that helped
EDIT: look at some of the OOTB script includes:
EDIT2: your return is not well formatted either. There will be no spaces.
return gr.email + "&" + gr.first_name + "&" + gr.last_name;it will look like this:
return example@test.com&FirstName&LastNameSo better to do it like this:
return gr.email + " & " + gr.first_name + " & " + gr.last_name;
//or even better
var userDetails = gr.email + " & " + gr.first_name + " & " + gr.last_name;
return userDetails;
This reply is 100 % GlideFather and 0 % AI
