Passing URL parameters in record producers
Passing a URL parameter is some times practical, and in theory no hard to solve. You can in client script use some rather simple javascript code to get your URL, and parse your values from there. For example the line document.url will give you everything.
Unless you are in a record producer, apparently.
I tried grabbing my URL parameter without any luck until I realized I got a different URL than I expected due to the page being loaded in an iFrame.
Solution:
Change out the line
var url = document.referrer;
In the end, my script which aimed to automatically set the assignment group field, looks like this:
function onLoad() {
var url = document.referrer; // this used to be document.url
url = url.substr(url.indexOf('sys_group='));
var assignment_g = url.substr(url.indexOf('=') + 1);
g_form.setValue('assignment_group', unescape(assignment_g));
g_form.setReadonly('assignment_group', true);
}