Support Article
Click on "Link" Control appending "%3F" at the end of URL
SA-3878
Summary
User notices that clicking on a Link Control creates a URL with "%3F" at the end of the URL which then fails to load.
Error Messages
No Error Message, but an incorrect URL is opened
Steps to Reproduce
In a section use a link control with an action set and a click event like "Click" and "Open URL in Window". Upon clicking this link in the portal a new page will be opened with an incorrect URL i.e. "https://<domain/...>/open.order?orderId=111111%3F"
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules. Parameters cannot be passed in a single URL.
Resolution
This issue is resolved through the following local change:
The expected/designed way to use the "Open URL in Window" action is to pass parameters as follows. Parameters cannot be passed in single URL, by current specification.
When parameters are passed in this way, the "%3F" is not appended.
In the Cell Properties window, specify ‘Add another action set’ then:
Add an Event: click X
Add an Action: Open URL in Window
Fill in the Domain URL, then complete the parameter value pairs (e.g.):
ACODE "M02345”
D122 “20141202”
Flags “2”
D122 “20141202”
Flags “2”
With this approach, the URL is generates in the form:
<domain/…>/ACODE=M02345&D122=20141202&Flags=2
Although the parameter has to be added to the Open URL in Window at design time, the value can be a property reference. Eg.
ACODE .pxUserCode
D122 .pyDisplayDate
Flags .pyCount
A .pxAAA
B .pxBBBB
C .pyCCCCC
D122 .pyDisplayDate
Flags .pyCount
A .pxAAA
B .pxBBBB
C .pyCCCCC
In this case, the property values are substituted in the opened URL string:
<domain/…>/ACODE=M02345&D122=20141202&Flags=2&A=25&B=&C=
The Web application has to parse the URL and collect the parameters and values. Code has to be written to perform the parsing of the long URL and store the parameters into the destination parameter on the clipboard.Some parameters may have empty values, as shown above for B and C, and some web application servers have a URL length limit, so the URL string could be length limited and restrict the set of parameters with their values.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.