mantainCustomer: function mantainCustomer(data, ty...
# suitescript
c
mantainCustomer: function mantainCustomer(data, type) { var customer; var customerType = type || 'customer'; var isEdit = !!data.internalid; if (!isEdit) { customer = nlapiCreateRecord(customerType); } else { customer = nlapiLoadRecord(customerType, data.internalid); } _.each(data, function eachData(value, key) { customer.setFieldValue(key, value); }); return nlapiSubmitRecord(customer, false, true); }