Help with Javascript in a client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2025 02:49 PM
I have a custom table. In the form view there is a call name field (references the sys_user). What I want to is that when the form loads there should be an icon next to the caller name. This icon would allow the user to see the past incident records of the user. I run into an issue with a backtic. I do not know how to correct this error. Any ideas? My full code is below. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 02:43 AM - edited 03-17-2025 02:43 AM
In this line:
historyHTML += `<tr>
replace `<tr> with '<tr>'
Or use any code editor (e.g. VSC), it could help you to clean your code, there are some online editors but for that, use it only if it does not contain any company details (e.g. sys ids, names, etc).
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 04:58 AM
Agree, if I recall correctly, ServiceNow does not support multiline strings nor interpolation. You'll have to go "old school"...