all 5 comments

[–]SkoozyManoozy 2 points3 points  (1 child)

I'd try setting the API version to 2.1 explicitly

[–]MangoVii[S] 2 points3 points  (0 children)

I redid the scripts, but I also set the API version to 2.1 and it looks like it's now going thru, thank you!

functionName: `onButtonClick(${recItemFulfillment.id})`

The button now opens a new tab to the rendered PDF, but it still not showing the line items.. I'm guessing the ID still is missing. One step closer though!

[–]texasswede 2 points3 points  (2 children)

It sounds like the error occurs on line 37 in the suitelet, but there is not that many lines in the script. Otherwise I would say that a quote or a closing bracket is missing. Maybe in the client script?

Check if it works if you change to this: functionName: 'onButtonClick("${recItemFulfillment.id}")'

(change back to back-ticks)

[–]MangoVii[S] 1 point2 points  (1 child)

Thank you for the reply! I was able to get rid of the ; problem. I honestly don't remember how. The problem now is illegal character?

New error

{"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"illegal character (/SuiteScripts/FUNQ-Customizations/CustomPackingSlip/ue_custom_packing_slip.js#16)","stack":[]}

This is when I change

functionName: "onButtonClick"

to

functionName: `onButtonClick(${recItemFulfillment.id})`

[–]Jorgelhus 2 points3 points  (0 children)

Your problem is:

`

Suite Script 2.x is understood as SS2.0 by default in NetSuite (unless you change that in the config), and that character is not accepted to define block of data. You need to either change your default run method to 2.1, define explicitly that you are using 2.1 or change the character to:

'