so i have a client script that is calling a suitel...
# suitescript
n
so i have a client script that is calling a suitelet. I am having trouble getting the response back to the client. The client is correctly invoking the Suitelet with the correct parameters and the suitelet is then making the correct calculations and returning the correct value (I can see this by looking at the logs of the suitelet). However I am trying to
return
that value back to the client script. I have tried to
return
the desired information on the suitelet as well as
sererResponse.write
the value. I am using
https.get
in order to resolve the suitelet.
i
On the suitelet you should use the .write to respond with the required data. On the client side, you should get the body of the .get response and there you will find your data.
n
okay that is what I thought.
so var response = https.get({..})
response.body returns the response.write on the suitelet
i
Yep, exactly 👍