Hello. I'm wondering if anyone can help me with th...
# suitescript
m
Hello. I'm wondering if anyone can help me with this. I have to call a remote API to get some data (securely) from a Suitelet front-end script, so that when a user presses a button, some of the UI form fields are filled in with the data that is returned from the remote API. The front-end script is attached to Form.clientScriptModulePath. I don't really want to use the N/https object on the front-end to call the remote server for security reasons, but I don't want to do a form submission. I'm wondering what my options are. Is there any easy way to connect the front-end/back-end scripts to communicate with each other (ajax?), so that when the user presses a button, an ajax request is sent to the back-end script, which calls the remote api and returns the result to the front-end? Or will I have to resort to calling say, a restlet, which will make the remote call? Any help or clearing up of confusion would be appreciated :) Cheers!