The image below shows the values I'm trying to set...
# suitescript
s
The image below shows the values I'm trying to set, and the script snippet is my attempt at accessing the fields. I've scripted setting values for the itemvendor, and they include the fieldid when accessing the sublist. Not sure if this is needed for an array, or how I would reference it. How do you set the pricing values through script?
b
i heavily recommend learning how to work with normal sublists first
i wouldnt have expected your code to work with a regular sublist
t
@Stephen Elms Here's how I'm setting the prices.
👍 2
s
I'm getting a
theRecord.selectLine is not a function error
. Doesn't make any sense??? Here is my module list: define(['N/record', 'N/search', 'N/log', 'N/runtime', 'N/currentRecord'] @tdietrich are you doing a load of the inventory item prior to the code you show above?
@here 👆?
s
By using @ here, you have just notified all active users in this channel. Please only use @ here when absolutely necessary.
s
Do I need to use
getSublistSubrecord
to get there?
t
@Stephen Elms What I showed is part of a larger function that creates an item, sets the base price, etc. Based on the code that you showed above, you would replace the references to "theRecord" in my code snippet with "itemRecord."