If you want to post data to an internal suitelet, ...
# suitescript
a
If you want to post data to an internal suitelet, how can you do so with the internal URL? It comes up with 'You must login before accessing...' message when attempting to do so with an internal URL
s
Just include the suitelet script as a module, and call the suitelet file's post function directly. This is the preferred way from a server side script.
👍 2
s
'preferred' is debatable, it's a trade-off between coupling and convenience.
a
@scottvonduhn If it's included as a module, it will have its own governance limit and not consume governance from the script utilizing it, right?
s
well, it will use the current script's governance
so, if that is a concern, you might need to structure things differently
a
That was the reason I created the suitelet...in that case perhaps I need to post to its external URL?
s
what kind of script are you trying to call from?
a
it's from a user event script
s
Other potential options are to use a restlet instead (that requires authentication), or to put the code in a scheduled script, then submit the scheduled script as a task from the UE, passing the JSON through a script parameter
a
@scottvonduhn hmm, good idea, I think I might utilize a scheduled script instead, thanks!
s
Scott's scheduled script idea is better for performance than blocking a UE script
👍 1