I want to inspect a value on an Item record when a...
# suitescript
m
I want to inspect a value on an Item record when an item is selected on an order. To do this (in my client script) I would need the item record type first to do the below:
Copy code
const SERIALISED_ITEM = record.load({
    type: record.Type.SERIALIZED_INVENTORY_ITEM,
    id: item_id,
    isDynamic: false,
});
Is there a way to get the record.Type? The only way I can think of is to use a saved search query, which seems a bit of an overkill.
b
search.lookupFields is slightly less expensive
m
Instead of record.Load? Yeah, that would make more sense. Looks like I could just do this:
Copy code
type: search.Type.ITEM,
I thought I needed to specify the exact item type but the above seems to work.