This topic contains 4 replies, has 0 voices, and was last updated by david.mendoza 7 years, 11 months ago.
-
AuthorPosts
-
November 30, 2016 at 11:22 am #5712
david.mendozaIs this possible?
I found articles and examples doing this with client scripts.
I used article 51705 as an example.
When trying to use the relative url of the RESTlet in the nlapiRequestURL function, the user event script throws this error: Code: SSS_INVALID_URL Details: The URL must be a fully qualified HTTP/HTTPS URL
Thanks!
This is a cached copy. Click here to see the original post. -
November 30, 2016 at 11:32 am #5713
chanarbonThe relative URL that you are using is does not have the domain since the string value of the result of nlapiResolveURL has no rest.netsuite.com or etc on it. Have you tried using the using the displayMode true to have the external URL then add the authentication header since the call on the server side would require Authentication header. Else if you don’t want to store the passwords, use Token-based authentication
-
November 30, 2016 at 11:49 am #5714
david.mendozaYes, I have used the absolute url of the RESTlet along with hard coded authentication values, which does sucessfully invoke the RESTlet from the User Event script.
Nonetheless, based on all the articles in SuiteAnswers, I want to be able to do it similar to the client script example 51705 where authentication header is not required.
Is this possible??
-
November 30, 2016 at 12:07 pm #5715
chanarbonIf you want to do the similar thing as noted on the article mentioned, it is not possible on the server side script. It works in the client side with this note “Because the client script is expected to have an active session, it uses a partial URL to call the RESTlet. That is, the URL does not have to include the RESTlet domain. You can find this partial URL in the URL field of the script deployment record for the RESTlet.” which can be found on SuiteAnswers 51013. But on server side, the session details are not added right away to the call that’s why you need to add an authentication header on your serverside script
-
December 8, 2016 at 6:14 pm #5716
david.mendozaI ended up invoking a suitelet.
Thanks for the responses.
-
AuthorPosts
You must be logged in to reply to this topic.