Thanks for the reply, Dan, helped me remove the thought that I could handle
rl the same way I handle
z.
We did come up with two solutions, which are laid out below. Both listed with their Pros/Cons for anyone that may need to overcome this "feature" in the future.
---
Solution #1:
Simply create a new
Formula - URL field that creates an edit (
a=er) link to the record, this way you can moderate which URL Parameters are added. Then you will need to add this new field/link/button (I'll refer to it as the "Edit Button" here out), to all the reports you know a user could access the record(s) from. In addition, you need to edit the reports to not show the native "View" and "Edit" links. Now your users will use the new "Edit Button" you created to edit these records and the
rl parameter will not be present so the
RedirectURL will be respected.
Pros: A user can go directly to a record from the forms we updated and not have any extra page refreshes, as well as the RedirectURL will work every time when coming from those new "Edit" buttons. Also, this is a "no-code" solution, that only requires a
Formula - URL field.
Cons: You have to know, and moderate, all the places a user may come from to view/edit a record. If a user finds or creates a report, that was not updated, the
rl= parameter will still exist and your
RedirectURL will not be respected.
---
Solution #2:
Using the Image Onload technique, load a code page
.js file to the form via a
Formula - Rich Text field
(The code for the image onload technique and the code page are included at the bottom). In the
.js code page, I have a function that will take the page's URL, remove the
rl= parameter and then refresh the page without it. When the page refreshes without the
rl= parameter the RedirectURL will be respected.
Pros: Removes the necessity to know where your users may come from, eliminating any unknown edge cases. All that is needed is to include the Formula - Rich Text field on any reports you need the
RedirectURL to be respected on.
Cons: This solution does require the user to experience an automatic page refresh as the form loads if the
rl= parameter is present. However, if the parameter is not present, there will be no refresh. This solution also requires some custom coding but should be as easy as copying and pasting the values provided as no changes are required.
---
Solution #2 Formula - Rich Text Value:"<img qbu=\"module\" src=\"/i/clear2x2.gif\" " &
"onload=\"javascript:if(typeof QBU=='undefined'){QBU={};$.getScript('" &
URLRoot() &
"db/" &
Dbid() &
"?a=dbpage&pagename=removeRLParameter.js&rand='+Math.random())}\">"
Solution #2 .js Code Page:
https://pastebin.com/2rWgEzjk