Using the redirect.toSuitelet function, users are allowed to pass certain parameters to the receiving suitelet. In order to retrieve the passed parameter the user must access the context.request.parameters object to get the list of available parameters
On the originating suitelet, the parameter is passed via:
redirect.toSuitelet({
scriptId: '31',
deploymentId: '1',
parameters: {
'custparam_test':'helloWorld'
}
});
On the receiving suitelet, access the parameter using the code below:
var paramRecID = context.request.parameters.custparam_test;