```const beforeSubmit = (scriptContext) => { ...
# suitescript
c
Copy code
const beforeSubmit = (scriptContext) => {
    if (scriptContext.type === scriptContext.UserEventType.CREATE ||
        scriptContext.type === scriptContext.UserEventType.EDIT) {

        const unitCost = scriptContext.newRecord.getValue('unitcost');
        scriptContext.newRecord.setValue('custbody_item_unit_cost', unitCost);
    }
}
8 million records being updated via CSV and this function is set to run for the CSV context. It seems to be running for a lot of the record saves but not for some. Is there any reason why the UE would fire for one instance of an Inventory Cost Revaluation record but not others?