RE: Error Setting Inventory Detail w/ Client Script
Hi, I had a user event script that successfully created an inventory transfer and set the inventory detail on each line. Due to changing requirements, I had to migrate the code to a client script. For some reason now, I keep getting the following error when I try to set the inventory detail: TypeError: event.record.getCurrentSublistField is not a function.
The odd thing is the line that is causing the error (313 below) doesn’t even use this method. It’s using setCurrentSublistValue. The record is dynamic, so I know that’s not the issue, and the inventory is in the right location.
Any idea why this would be happening when I switched to the client script?
You probably want to take a closer look at the stacktrace. Its probably an internal function call, NetSuite’s internal function use suitescript too.
That probably means you need to submit a support case. While you are waiting to resolve the issue, you might want to put the code in a suitelet and make a https request from the client script to the suitelet to do the work instead.