Is there a way to read URL parameters in Record Producer script?

dhananjay_m
Kilo Contributor

I have a Record Producer which I am calling from a related list new button UI Action. This UI Action redirects with some parameters to the Record producer form. Now I want to use the parameters when I am submit the form and I am looking for a way to access the URL parameters within a Record Producer's script. I tried various things like window.location.url, g_form.getParameter(), etc neiter window object is defined and nor g_form works.

Appreciate your help.

Thanks,
Dhananjay

8 REPLIES 8

Jim,

demo10 has long been refreshed. Do you still have this "Parameter Test" Record Producer? I'm interested in seeing it.


Jim Coyne
Kilo Patron

Not likely, as the script runs on the server and the URL parameters are on the client side.

I've reloaded the test solution for you in demo10 again (I usually always save them in an Update Set), and have included it here as an attachment (just rename the extension from txt to xml).

The earlier links will still work.


Ok so perhaps I have to go via this route to access the URL parameters. May be I will dump the whole url (or required parameters) within one variable and just hide it from user. I can run the getParmVal script on this url within the Record Producer's script block. But yes the solution provide by you definitely works. Mighty thanks for setting this up for me.


Just saw the attachement, great!