- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 02:07 AM
I ran the following script as a UI action:
(Client is checked)
g_navigation.open('incident.do?sys_id=-1&sysparm_query=description=test');
The above worked fine, but the following didn't:
g_navigation.open('incident.do?sys_id=-1&sysparm_query=description=test80%')
I found out that "%" couldn't be used, so I used "encodeURIComponent" and it worked.
I wonder if there were any other characters that couldn't be used besides "%"...
I wanted to check if there were any problems with past records, but I would like to know if the problem occurs with strings other than "%"...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 03:39 AM
best to use encodeURIComponent before sending anything to any URL so that it gets rendered and populates correctly.
some other characters which should be encoded as per my understanding-> % < > " [] {}
You should get the list from google as well
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 03:13 AM
Hello @bonsai
incident.do?sys_id=-1&sysparm_query=short_descriptionLIKEtest%25off%20%26%20urgent
- %25 → used in LIKE queries
- %20 → space.
- %26 → ampersand (&) as part of the value, not a new parameter.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 03:15 AM
I am not aware of any other alternative than encodeURIComponent:
Something like this, not tested:
Did the encodeURIComponent work for you?
/* 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
06-05-2025 03:39 AM
best to use encodeURIComponent before sending anything to any URL so that it gets rendered and populates correctly.
some other characters which should be encoded as per my understanding-> % < > " [] {}
You should get the list from google as well
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader