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?

Error Setting Inventory Detail w/ Client Script

Beginner Asked on April 4, 2020 in SuiteScript.
Add Comment
2 Answer(s)

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.

Advanced Answered on April 5, 2020.

Gotcha, thanks!

on April 6, 2020.
Add Comment

Sorry to comment on this thread a few months afterwards but were you able to fix the issue?

I’m running a similar script and getting the same problem.

Rookie Answered on June 16, 2020.

I honestly can’t remember. It might have been a limitation with the client script. I just know I ended up creating a Suitelet instead and adapting the code to it, which is below.

RE: Error Setting Inventory Detail w/ Client Script

on June 16, 2020.

Ok! Thank you for the response I will look into that!

on June 16, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor