Anyone have any tricks to pass a parameter to the ...
# suitescript
s
Anyone have any tricks to pass a parameter to the before load user event (on create) when creating a record via a suitelet?
g
what exactly are you trying to do?
s
Pass in a dynamic parameter, similar to adding a param to the url when opening the record's create screen via the browser.
However, trying to do this via a suitelet as well.
g
I guess client script can help but not in parameter tho.
b
its probably easier doing the work in the suitelet instead
e
On the UE beforeLoad event use context.request.parameters.yourparameterhere to read that parameter from your suitelet.
s
@Eric B is it possible to manipulate the parameters from within the suitelet before calling record.create (so that you can control the parameters passed each time you call record.create)?
@battk that's likely what will need to happen - I have a feeling there's no easy way to pass in a parameter.
e
Well with a suitelet you should have total control over what parameters you are passing to the function that creates the record. I do this all the time with a client script that passes those parameters to a suitelet whose only job is to accept parameters and then decide which functions to call. The client script which collects the parameters does an https.get to the suitelet URL with the parameters needed.