USER_ERROR USER_ERROR("You cannot create an invent...
# ask-stanley-ai
n
USER_ERROR USER_ERROR("You cannot create an inventory detail for this item."); even though the item is inventory var inventoryDetailSubrecord = currRec.getCurrentSublistSubrecord({ sublistId: 'item', fieldId: 'inventorydetail' }); inventoryDetailSubrecord.selectNewLine({ sublistId: 'inventoryassignment' }); inventoryDetailSubrecord.setCurrentSublistValue({ sublistId: 'inventoryassignment', fieldId: 'issueinventorynumber', value: promoLot }); inventoryDetailSubrecord.setCurrentSublistValue({ sublistId: 'inventoryassignment', fieldId: 'quantity', value: calcPromo }); inventoryDetailSubrecord.commitLine({ sublistId: 'inventoryassignment' }); inventoryDetailSubrecord.commit();
c
Hold on! Working on it ...