How can I create a UI Action and UI Page to Add records from another list?

Taylor W
Mega Expert

Hello,

Below are few screenshots of a capability I am trying to replicate. The idea is to click the "Add" button on the related list which then displays an iFrame or GlideWindow that allows the user to select records to add to the related list (via some other background scripts). I have already tried to dig into the code but the UI Page is hidden due to proprietary reasons. 

I was able to somewhat replicate it by inserting an iFrame into another iFrame but the set back I have run into is the iFrame throwing an error / crashing when I insert to many sys_ids into my filter condition (filtering out records that have already been selected for the parent record). I posted about this issue in another post here.

If anyone has any recommendations I am all ears! Thanks!

Related List

find_real_file.png

iFrame / GlideWindow Popup (when user clicks "Add" above) 

find_real_file.png

7 REPLIES 7

Kieran Anson
Kilo Patron

Hey,

Regarding your issue on the other post, query strings have a limit of 2083 characters before they become a sysparm_tiny query. This prevents the session falling over with a HTTP 400 error with "java.lang.IllegalArgumentException: Request header is too large".

What you can do is check if the query contains the "sysparm_tiny" url element, if so GlideRecord to the sys_tiny_url using the sys_id provided.

find_real_file.png

find_real_file.png 

 

 

"What you can do is check if the query contains the "sysparm_tiny" url element, if so GlideRecord to the sys_tiny_url using the sys_id provided."

 

Thanks for responding Kieran! When you refer to the "sys_id" provided, do you mean the sys_id for that table? Could you provide some sort of example? Sorry for the confusion here, I have not seen anything regarding the sysparm_tiny element before. Only been working in SNOW for a few months!

Hey not a problem.

As you can see from the below screenshot, I've performed a lengthy query and servicenow as effectively turned the query string into a tiny url. This can be seen in the green area hightlighted.

sysparm_tiny = indicates to Snow that the query parameter is stored in the tiny url table rather than being encoded in the URL.

32 character string = sys_id to the table record.

find_real_file.png

Looking at the sys_tiny_url table, you can see that the record with a tiny URL of 7875.... as per screenshot one has a record, this record contains the original query in the "data" field. That is your query string of values.

find_real_file.png

Nice! So can I ultimately use this? I just have to do a check for the tiny_url parameter and if its there do a GlideRecord to the sys_tiny_url table to access the query string? If that is all correct, how do I apply it to my filter condition....?