https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
g

Gail Kasnett

04/28/2022, 6:07 PM
Copy code
var per_carton_quantity = context.newRecord.getSublistValue({
                    sublistId: "item",
                    fieldId: "custitem_case_qty",
                    line: q
                })
                log.debug('per carton qty', per_carton_quantity)
for some reason this is coming back blank even though -- there is data there. Any ideas. its a beforesubmit pulling the data fro the items in an IF
b

battk

04/28/2022, 6:51 PM
you have the wrong internal id
a transaction field wont have the internal id of an item field
g

Gail Kasnett

04/28/2022, 9:31 PM
which internalid are you referring to? i am getting otehr fields without an issue in the same way
b

battk

04/28/2022, 9:33 PM
Copy code
custitem_case_qty
is the internal id of an item field
there are no item fields on a trasaction
g

Gail Kasnett

04/29/2022, 7:57 AM
I am not sure i follow. I am pulling a sublist from the transaction... it works for the next one
Copy code
var length = (parseFloat(context.newRecord.getSublistValue({
                    sublistId: "item",
                    fieldId: "custitem34",
                    line: q
                })) || 0);
b

battk

04/29/2022, 8:18 AM
and what value are you getting for custitem34?
you should be getting 0
g

Gail Kasnett

05/03/2022, 9:10 PM
thnaks (sorry was dealing with someother stuff - just got around to this)