RE: Post a Suilet from button click

Hello everyone,

 

I have a button on the item record. When clicked, it should open a suitelet in a new window. I have to pass a JSON object as a parameter to the suitelet. So, when using GET, it fails as the URL exceeds the limit. Can anyone tell me how to call a Suitelet using POST and send the parameters (JSON object) from a button click in the client script.

 

Thanks.

rams Rookie Asked on September 20, 2019 in SuiteScript.
Add Comment
5 Answers

Do you really need to post it upon button clicked? Then use https.post then put your json in the body then the suitelet invoked will put that json data into the runtime session. Key value pair stored is available in server to server only. Then after invoking the first suitelet. You can now call another suitelet then get the key value pair stored in the runtime session.

Beginner Answered on September 24, 2019.

Thanks for sharing this, this works perfectly!

on December 11, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.