I'm transforming a Work Order to Assembly build an...
# suitescript
e
I'm transforming a Work Order to Assembly build and trying to add serial numbers to the completed assembly. But I keep getting "please enter serial/lot number" Anyone see anything wrong with this code? I've made sure that itemInfo.serials is an array of ['TESTING123']
Copy code
let inventoryDetailRecord = assemblyBuild.getSubrecord({
    fieldId: 'inventorydetail',
});

for (j = 0; j < itemInfo.serials.length; j++) {
    inventoryDetailRecord.setCurrentSublistText({
        sublistId: 'inventoryassignment',
        fieldId: 'issueinventorynumber',
        text: itemInfo.serials[j]
    })

    inventoryDetailRecord.setCurrentSublistText({
        sublistId: 'inventoryassignment',
        fieldId: 'quantity',
        text: 1
    })

}
s
I avoid working with with subrecords, but is there a reason you are using setText instead of setValues?