Hello, is it possible to load Item Number Record i...
# suitescript
v
Hello, is it possible to load Item Number Record inside of a script, and if it is, what record.type enum should I use with record.load() for it?
👀 1
b
v
@battk Thank you for answering. Unfortunately I already tried that one, and while it does indeed work, I can’t get or change values in custom fields that are added to item number record. That’s why I thought I’m doing something incorrectly.
b
what does the code look like
v
Well I’m still just testing the waters here, but it looks like this https://pastebin.com/5tMD6FCx
b
that looks dangerous
the internal id of a line has no relation to the id of the inventory number
you probably have been updating the wrong inventory number
start logging the internal ids of the inventory numbers you are updating
v
Oh, no worries, I’m not updating anything through scripts yet, not until I understand enough of it. Never had to write scripts for inventory management, so I’m kinda lost for now. But huge thank you, you showed me where is my error, so hopefully I will make it work the intended way.
b
learn how to inspect the inventory detail record so that you can see which values are on the lines
you should be able to find a field that has the id of your inventory number
preferably you know the id of the inventory number first