tried loading an inventory item record using this ...
# suitescript
l
tried loading an inventory item record using this but i keep getting an error. can anyone help?
var item_record = record.load({
type: record.Type.INVENTORY_ITEM, id: if_internal_id, isDynamic: true, });
s
Gotta be an invalid
if_internal_id
, I would recommend logging that.
l
SuiteScriptError","name":"RCRD_DSNT_EXIST","message":"There are no records of this type.",
i think its inventory_item
e
are you trying to load an item record or an item fulfillment record? your variable name is if_internal_id almost like you're intending to load an item fulfillment?
s
your enumeration looks correct for an inventory item
l
this is what im actually doing here
type: record.Type.INVENTORY_ITEM,
id: item_internal_id,
isDynamic: true,
});
item_internal_id is being pulled from a item fulfillment saved search
this is the error that im getting now
essage":"load: Missing a required argument: id","stack":["createError(N/error)","beforeSubmit(/SuiteScripts/UpdateDimensions.js:103)","createError(N/error)"],"cause":{"name":"SSS_MISSING_REQD_ARGUMENT","message
s
Yeah
item_internal_id
is not defined, you should log it
e
add
log.debug(item_internal_id)
l
ok
i logged the value and i was able to fix it. Thanks so much guys.
👍 1