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.



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

For making a POST request to a Suitelet, @avivashisth provided a good answer, and that’s the approach I would take.

However, one other option if you’d like a different approach would be saving the JSON to a custom record and passing the internal ID of that record as a URL parameter when making a GET request to the Suitelet. Then the Suitelet could load the custom record by internal ID to load the JSON data.

Rookie Answered on September 23, 2019.
Add Comment

Your Answer

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