Hello guys, has anyone been able to create success...
# suitecommerce
e
Hello guys, has anyone been able to create successfully a SS 2.0 service? I have been following the tutorial provided by Steve G. https://developers.suitecommerce.com/develop-your-first-extension.html. and I think there is something wrong or maybe I am missing something, when my service is call I get a 200 ok status code, but the response is HTML and then I got an impossible to parse backend error which turns into an internal error in the front-end, there are two things that I am not sure if they are correct, the first one is that the rootURL is pointing to the _ss2 application/folder (see screenshots) but the suitescript2 folder which contains the service is deployed to the SSP 1.0, so for me that is confusing and I do not know is that is correct, the other part is that maybe the response is not the expected (I have also created an extension gulp extension:create , same result for the service 2.0)
s
A simple thing to check is whether you get this error when you swap your code with mine. I have put the code at each step on GitHub.
Your service should be deploying to SCA 2020.2.0 > Development2 > extensions > ExampleVendor > Example > 1.0.0 > Modules > UserPreferences > SuiteScript2
A common mistake is that people do not select None when the developer tools asks what type of file the backend model is
e
You are right, I have not tried to copy/paste your code, I just double checked and it seems identical, I will give it a try later on. I did select none whenever the developer tools asked me that but the wrong part that I am confirming based on your second comment is that it has not been deployed to the Development2 SSP. That is the error, could it affect to be using the dev tools 2020.1?
Hmmm wait I created an extension using gulp extension: create, and I got the same result/error, the service is not deployed to the SSP 2.0, just to the SSP 1.0.
s
could it affect to be using the dev tools 2020.1?
I mean, I haven't tested this code on older versions of the tools or SCA code so I wouldn't recommend using them
I would always recommend using the latest version of the tools
Have you enabled the SuiteScript 2.0 aspects of your account, as well as deployed the SS 2.0 SSP to your domain?
e
In the account that I am testing the extension manager has not been updated to the newest version of the bundle, I had to change the rootURL for the SSP 2.0 because it was used by someone else but I did deployed to my domain. I will create a new one again but the weird part is that I just noticed that in other account I deployed the default SS 2.0 service that is created by the dev tools in it was not deployed to the SSP 2.0 (but again, it was using dev tools 2019.2 or .1 ). It is weird because It is suppose that since that version if should work. I will let you know if I figure it out!
s
OK. BTW, when you get an "impossible to parse backend error" error, the specific error will be logged to the execution log so you will get more detail there usually
e
I checked the log and there was not error there šŸ˜•
s
Did you check the full log in Customization > Scripting > Script Execution Log ?
e
Now yes, but the issue is that the service is not deployed to the Development2 SSP, I need to fix that, probably is the dev tools.
s
Check your manifest file against mine. It's possible you haven't flagged the files as SuiteScript 2.0
e
Thanks Steve! I did something, I downloaded the most recente dev extension tools from other account, create a new extension (gulp extension:create), deploy it to the account (the one with still extension manager 2020.1) and it was not deployed to the Development2 (the SuiteScript2) folder. However the account from which I downloaded the dev extension tools did have something deployed into Development2 (SuiteScript 2) . So my guess is that while I do not have the recent extension manager on my NetSuite account it is not deployed correctly to the Development2 šŸ˜•
s
Does your manifest have this at the bottom?
Copy code
"suitescript2": {
    "files": [
        "Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Model.js",
        "Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Service.ss"
    ]
}
e
Yes they have, all the three different extensions I have tested (the one from the tutorial, the other created via the command the one using the extension dev tools 2020.2), all the manifests have that, do you know if the extension manager does something for deployments? I mean I know it helps us to activate the extension but I thought the extension dev tools is the one that knows where to deploy each folder/file.
s
Oh wait, you're deploying but not activating?
e
No, I did activate the first two, the last one I just deployed and checked but I just did it and even after deploying it, my Development2 is empty:
so, for some reason the dev extension tools is treating my service as 1.0 version and I do not know why, I selected none each type the prompt asked me about the service file.
s
OK, I don't know what to say. I am out of ideas
e
No problem! I appreciate your help!
t
Hey @eminero, did you end up finding a cause? Or a way to get it working? I have been playing with getting SS2 working in an extension for the past day and a bit (following the same blog guide) and I have also been getting this error. Haven't been able to figure out why.
e
Hey @Tariq Sanjakdar, Yes I did it! You need to take into account this, when you install the SCA for 2020.2 you get 4 SSP: • Src SSP 1.0 • Src SSP 2.0 • Dev SSP 1.0 • Dev SSP 2.0 You need to make sure your Dev SSP 2.0 has been deployed to your site/domain correctly and that the rootURL matches (just the 2.0 needs to have _ss2 at the end), you can test this checking if the cases work in my account. If you have done that your SS 2.0 should be working fine. In my case I had created an extra custom ssp 1.0 (Stating SSP 1.0) but I had not created the respective (Staging SSP 2.0). I thought it would work if the rootURL from Dev SSP 2.0 matched but I realized that you need to have the same publisher, so my solution was to create the Stating SSP 2.0 with the same publisher and same rootURL. Check this article: https://netsuite.custhelp.com/app/answers/detail/a_id/49080/kw/custom%20ssp. @Steve Goldberg in case you want to point that in your article that was my solution and was something I did not know.
šŸ‘ 1
s
I'm glad you figured it out! Thanks for the info
šŸ™Œ 1
t
@eminero Oh, great! That did cross my mind, at the end of the day yesterday, I was about to change my SSP to the SS2 one but does that mean any extension with SS1 will no longer work? @Steve Goldberg
e
You still need both, SSP v1 is where you will continue deploying your extensions but once you activate it, the extension manager will move the SuiteScript2 that you have in that extension to the SSP v2 but you have to deploy this one to your domain/site. If this part is confusing to you, read a little bit on the docs to get more familiar on what it means to deploy the SSP v2. (basically is just to click a button on the record of the SSP but it will depend on your domain setup for shopping/checkout)
t
thank you for that! šŸ™‚
šŸ’Ŗ 1
118 Views