```function disableLocationFieldOnAllLines(context...
# suitescript
e
Copy code
function disableLocationFieldOnAllLines(context) {
        var thisRecord = context.currentRecord;
        var locationField = thisRecord.getSublistField({
            sublistId: 'item',
            fieldId: 'location',
            line: 0
        });
        if (locationField)
            locationField.isDisabled = true;
    }