nathanw
09/13/2018, 10:18 PM/**
* 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,
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"nathanw
09/13/2018, 10:31 PM