Can I call record.submitFields on an item record w...
# suitescript
c
Can I call record.submitFields on an item record without knowing the type of the item? I just have a list of item internalids (some inventory item, some non-inventory item) and I need to set the value of a field for all of them.
n
As long as the 'type' parameter is the same, you should be good. Give it a go and you'll know.
c
type is different for inventory item versus non-inventory item
j
@cja, if you run them through a search first using a filter like "internal id anyof", then when you get each result you can grab result.recordType and pass that into you record.submitFields method.
👍 1
c
Thank you, that works perfectly
I always forget about the recordType property