mg2017
01/04/2022, 7:29 PMvar item_category = search.lookupFields({
type: search.Type.ITEM,
id: item_name,
columns: 'custitem_item_category'
});
log.debug({title: "Item Category", details: item_category.custitem_item_category});
How do I get the ID value from a select field? I've always managed using a free text before. Right now it returns an empty array []
Sandii
01/04/2022, 7:49 PMitem_category
instead, it should not be an empty array, if it is an empty array then the value is not set.mg2017
01/05/2022, 12:17 AMlog.debug({title: "Item Category", details:item_category.custitem_item_category[0].value});
but if the field does not have any values it throws error, so is there a way to handle this?mg2017
01/05/2022, 12:56 AM