From the API Record.create() ```/** * Create a n...
# suitescript
n
From the API Record.create()
Copy code
/**
 * Create a new record object based on provided type
 * @governance 10 units for transactions, 2 for custom records, 5 for all other records
 * @param {Object} options
 * @param {string} options.type record type
 * @param {boolean} [options.isDynamic=false] record is dynamic
 * @param {Object} [options.defaultValues={}] record default values
 * @return {Record}
 *
 * @throws {SuiteScriptError} SSS_MISSING_REQD_ARGUMENT if options.type is missing
 *
 * @since 2015.2
 */
function createRecord() {}
createRecord.prototype.promise = function() {};
record.prototype.create = new createRecord();
record.prototype.create = function() {}
What does options.defaultValues={} look like in a real world example? If I'm making a contact and I say,
Copy code
record.create({
  type: record.Type.CONTACT,
  defaultValues: {
    firstname: 'bob',
    lastname: 'jones'
  }
});
Is that how you default in a first and last name? I get "INVALID_RCRD_INITIALIZE"