When I try to execute the attached script I am ge...
# suitescript
b
When I try to execute the attached script I am getting this below error "name":"SSS_UNKNOWN_HOST","message":"The host you requested null is unknown or cannot be found." Tested on postman working fine for that endpoint. But not working netsuite suitescript
😎 1
n
localhost endpoint won't work in NetSuite.
b
Thanks @NickSuite netsuite sandbox also?
n
"localhost" endpoint are only used when developing on your machine. If you want other apps to communicate it with, you should deploy it to a webserver.
b
Thanks. So for developing stage also need to call public url for this? Any other solution?
a
you can make a suitelet to act as your fake backend I suppose - and mock up whatever responses you want from the suitelet?
but this seems like you're pushing NS data to some downstream system (or will be in prod) the part you need to test isn't really the http post, I wouldn't think? you need to make sure the data you're getting out is valid and formatted correctly for the receiving system... and you can only really do that from the receiving system side. but to the extent you can do it in NS... just massage your data as needed and log it, you don't need to actually post it to anywhere if the target system doesn't have a non-prod environment to test against, logging the JSON is as good as it gets.
b
thanks @Anthony OConnor I pushed to dev public server and tested its working
👍 1