- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2020 09:37 PM
I need to autopoulate change description from a url. The change description and contain special characters.
Please help how can I send the special characters through a url.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2020 10:32 PM
Use encodeURIComponent() to escape the characters like so:
'/change_request.do?sys_id=-1&sysparm_query=description=' + encodeURIComponent(current.description)
For more info refer to:
https://www.w3schools.com/jsref/jsref_encodeuricomponent.asp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2020 09:58 PM
You may find below blog helpful https://community.servicenow.com/community?id=community_blog&sys_id=596dea29dbd0dbc01dcaf3231f96190b
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2020 10:04 PM
I need to populate the description of a new change form through the URL. I am forming the URL through a UI Action as below:
'/change_request.do?sys_id=-1&sysparm_query=description=' + current.description
But when the description is having special character like "#" then it does not work. Without special characters it is working fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2020 10:32 PM
Use encodeURIComponent() to escape the characters like so:
'/change_request.do?sys_id=-1&sysparm_query=description=' + encodeURIComponent(current.description)
For more info refer to:
https://www.w3schools.com/jsref/jsref_encodeuricomponent.asp