function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
cmortcmort 

Access to HTTP Request in s-control object

I have a number of custom parameters which I need to get passed into an s-control where I will operate on them in javascript. This must be done via a form POST. Is there any means to get a handle on the http request parameters? Something like:

var parameters = '{!HTTP_Reqeuest_Parameters}';

Where parameters would be a map of the form params?

Thanks for any tips on this ( or any other means of getting at data that only the server has access to )

- cmort
adamgadamg
Hmmm.. guess is this isn't possible (although it is of course possible to retrieve the GET parameters)

Perhaps you could persist the data in an object/field from the first page and retrieve in the second via the AJAX toolkit?
DevAngelDevAngel
How is your s-control being invoked?

What I have noticed is that if the scontrol is invoked as a web tab, then any parameters that you put on the url are removed. This is not the case when the scontrol is invoked as a web link. Why? Don't know.
djqadjqa
I have similar requirements where my scontrol wants to take several different values from the user as a parameter. This allows us to build a scontrol (sharing code) to return resultset that is controlled by user criteria. e.g. select id, name from custom_object where type = $user_specified_type.

Is it possible to pass a user-defined parameter user_specified_type thru custom links to the same scontrol? We can have several custom links, if needed, one for each specific type.

Thanks
Hitesh
Ron HessRon Hess
I tried adding a paramater to the custom link that launches the scontrol and then looking for that paramater once i got into the scontrol, however i was not successful.
It appears that the scontrol URL is re-contstructed when launched and my paramater was not included.

if anyone has a way to do this, it would be handy.

possible workaround:
you may want to consider putting this (type) into a custom field on the user object, then you can easily access the value inside your scontrol using a {!User_mycustom} merge field.
djqadjqa
Custom Field is not the way to go as it is user defined parameter, in fact, at user session. It is the option/parameter that the user selects. Based the option selected, I would like the scontrol to behave differently.

Hitesh
Ron HessRon Hess
ok, i understand, how about this:
in your scontrol,start by popup a picklist , then proceed after user has selected.
sorry i can't think of another way just now.
djqadjqa
that would work. thanks