Hey all, I have a SS 2.1 script that is 3rd party ...
# suitescript
m
Hey all, I have a SS 2.1 script that is 3rd party and AMD compatible (it uploads to the File Cabinet completely fine as well). It is tagged appropriately with both
@NApiVersion 2.1
and also
@NModuleScope Public
. However, when I try to create another script which uses the module as an import, I get an unusual error saying
SuiteScript 2.1 entry point scripts must implement one script type function
(this occurs right before creating the script, but after selecting the entry point script file). This other script tha tI am using to import the module does have an entry point function (in this case, client script saveRecord). And when I replace the SS 2.1 3rd party AMD script with a placeholder (just define with a return), it works fine. Does anybody have any clues on how to solve this?
c
are you using it in a client script? I've seen this when I attach a module to a client script for executing button clicks and I had to just add an empty pageInit and it went on w/ life.
m
@creece Yep, in a client script. I guess I'll try that. Interestingly enough... it's not complaining about my other client script... just this one. Thanks for the help, and I'll post how it goes in a bit.
b
if you include the @NScriptType tag in the jsdoc, you have to implement an entrypoint
even if you get rid of it at some point, there is a hidden flag that marks the file as a script entrypoint
slack bookmark 2
👀 2
m
@battk Is there any way to get rid of this? Or do you just have to delete the file?
b
delete the file
m
@battk Did so, but it didn't quite help. Gonna try and delete the original EntryPoint as well.
Deleted all of them, and then re-uploaded. Didn't fix the case for this particular script... I'm probably going to have to stick it in as a non-AMD script or something like that... I'll try that next.
Thanks all for your help
Just an update for all... it turned out not to be related to the flag @battk talked about (though thank you for providing this information, as it was incredibly useful to know, and not something I knew before). It seems that Netsuite just doesn't like adding the script I provided, even as a non AMD-addon. I can only really use it in Suitescript 1. So, instead, I swapped to another library that does the same things, and is a bit smaller too. It works fine. Thank you all for your help.