Hi All, I am using the following code to test in script debugger:
require([‘N/record’], function(record){
function generateCmRecord(invId) {
var cmRecord = record.transform({
fromType: record.Type.INVOICE,
fromId: invId,
toType: record.Type.CREDIT_MEMO,
})
return cmRecord
}
var cmRecord = generateCmRecord(116)
cmRecord.save()
log.debug({title‘test’,details‘finish create credit memo’})
})
it is successfully created.
However, when I put the same logic in client script, it throws out a message: “Please enter value(s) for: Country”
Does anyone know what is the source of this error?
I tried looked into credit memo record and there’s no field for Country