My Stuff
Comments
-
I've had more success with this in the past if I created a separate SUITElet that is used only for generating the GUID. Here's an example of a template I use. /** * @NApiVersion 2.x * @NScriptType SUITElet * */ define(['N/ui/serverWidget'], function (serverWidget) { function onRequest(context) { if (context.request.method…
-
Oh, I think I see something. You are trying to save the SO after each line which causes the record to be changed and would though an error on the second line your adding. salesOrder.save({}); I've tried salesOrder.save({}) outside of the loop as well and was getting the same error.
-
No, but you could refactor to a Scheduled Script that runs however often you need and looks for Item Fulfillments marked shipped in the last hour or two. So I could use the search module to look up the recent item fulfillments that I need, but in a scheduled script instead of User Event?
-
Is there a solution to it. am running into the similar problem. Sorry mary, I didn't see this reply until just now, but the issue resolved itself with the 2017.2 release, for me anyway.
-
Have you inspected your componentsOfKit array? I would log that and see what it's doing as a first step. It's returning the ids of the components of the kit. Here is the output: componentsOfKit: 82875,77864,77899 I still get the error if I just put in the item's internal id manually. It's really weird, like I said, if I…
-
The error comes up the second time you select a new line with selectNewLine(), setCurrentSublistValue() and commitLine(). I tried to run the script in standard mode using insertLine(), setSublistValue() and save() but now I get the same error on save(). I suggest to involve Support or use SuiteScript 1.0. Thanks for…
-
Well there are quite a few things I would structure differently in this script. However, I'm not sure if there are mandatory column fields you're not setting on the form or not. Have you tried setting the isDynamic mode of the sales order to false? I feel like there is something wrong here. Even after I turned off dynamic…
-
david.smith I've even tried completely removing the record.save({}) function just to see if that atleast gets rid of the error and I still get a unexpected_error message on the same line. I'm completely stumped.
-
Well there are quite a few things I would structure differently in this script. However, I'm not sure if there are mandatory column fields you're not setting on the form or not. Have you tried setting the isDynamic mode of the sales order to false? No, I'll give that a try
-
If I was trying to add javascript variables to a string like that I would just concatenate using +. Using your example: Wow, I was really overthinking this. Thanks for the help.
-
salesOrder.setCurrentSublistValue({ sublistId: 'item', fieldId: 'item', value: componentsOfKit[i], ignoreFieldChange: false, fireSlavingSync: true }); Try adding these parameters to your setCurrentSublistValues. I've also had to do window.setTimeout(FUNCTION(), 10) to slow down the adding of lines as well. Nope, still…