Get Item Record Type

04/7/2021
require(['N/search'], function (search) {
    //@method getItemSubRecordType
    function getItemSubRecordType (id) {
        const fieldLookUp = search.lookupFields({
            type: search.Type.ITEM,
            id: id,
            columns: ['recordtype']
        });

        return fieldLookUp.recordtype;
    }
    
    const itemId = 1234;
    const itemSubType = getItemSubRecordType(itemId);
    log.debug('itemSubType', itemSubType);
});