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?

RE: Error Setting Inventory Detail w/ Client Script

mmascitto Beginner Asked on April 4, 2020 in SuiteScript.
Add Comment
2 Answers

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.

Intermediate Answered on April 5, 2020.

Gotcha, thanks!

on April 6, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.