Widget

HARSHA GOWDA R
Tera Contributor

I’m facing an issue in a custom Service Portal widget that displays Active Access Requests (RITMs) for my team. When the team has a small number of RITMs, the widget works fine, but when the count grows large (around 3000), the widget fails with a 414 Request-URI Too Large error. The widget currently constructs a list URL by appending a large number IN query with many RITM numbers, which seems to exceed the URL length limit. Is there any supported way in ServiceNow to convert or shorten a large URL, or what is the recommended alternative approach (such as server-side queries, relationship-based filters, or pagination) to handle large result sets in Service Portal widgets?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@HARSHA GOWDA R 

are you filtering the RITM records based on some query/condition?

if yes then why not use query BR to restrict rather than forming long URL?

see these links

How to Shorten ServiceNow Urls 

Enable tiny URL support 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @HARSHA GOWDA R ,

 You can shorten the URL using System Definition > Processor. 

Refer below tutorial:
How To Shorten URL in ServiceNow? | ServiceNow Tips & Tricks 

Regards,
Siddhesh Gawade


Deepak Shaerma
Kilo Sage
Kilo Sage

Hi @HARSHA GOWDA R 

ServiceNow has a built-in table (sys_tiny_url) specifically for shortening long queries. If you cannot use a Dynamic Filter, you can generate a "Tiny URL" key.

Use the GlideTinyURL API to convert the long query into a short

var hugeQuery = "numberINRITM001,RITM002......";
var tinyUrl = new GlideTinyURL();
var tinyId = tinyUrl.create(hugeQuery); 
// This creates a record in sys_tiny_url and returns the GUID



Happy to help! ‌‌
To help others in the community find this solution, kindly mark this response as the Correct Answer ‌‌ and Helpful‌‌.
Warm Regards,
Deepak Sharma
Community Rising Star 2025