Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Unable to read URL parameter in UI Page.

Community Alums
Not applicable

I am unable to get the URL parameter of UI Page.

 

 

Here is the URL:

https://mycompany.service-now.com/ui_page.do?sys_id=cca208c91b799610e340da47b04bcbf5&sysparm_test=te...

I am reading the URL query parameters using this code:

<j:set var="jvar_sys_id" value="${RP.getParameterValue('sys_id')}" />
<j:set var="jvar_test" value="${RP.getParameterValue('sysparm_test')}" />

Although both parameters are present in the URL, only “sys_id” has a value, while “sysparm_test” is empty.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

I discovered the issue myself. The getParameterValue method does not work with the URL format https://mycompany.service-now.com/ui_page.do?sys_id=cca208c91b799610e340da47b04bcbf5.

I changed the URL to https://blkdev.service-now.com/myUIPage.do, and it started to work. However, this look like a bug of ServiceNow to me.

View solution in original post

1 REPLY 1

Community Alums
Not applicable

I discovered the issue myself. The getParameterValue method does not work with the URL format https://mycompany.service-now.com/ui_page.do?sys_id=cca208c91b799610e340da47b04bcbf5.

I changed the URL to https://blkdev.service-now.com/myUIPage.do, and it started to work. However, this look like a bug of ServiceNow to me.