Does anyone know if I can check a record’s type wi...
# suitescript
j
Does anyone know if I can check a record’s type without loading it? For instance, I have a custom fields on an item record that associates it with another item. The type of item varies from situation to situation, so I only want to execute an action if that associated item is an inventory item. Does that make sense?
s
You should be able to get the type from creating a search, they all fall under
item
j
So I’d have to create a search using the ID returned by my custom field as the only parameter and loop through the results? Is that what you mean?
b
Basic answer is to use search.lookupFields to get the recordtype of the item
SuiteBuilder answer is to use Sourcing on another custom field to avoid the search, though the values you get arent quite the same as the recordtype