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

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.