Hi All, I am using the following code to test in s...
# suitescript
s
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
b
id start looking at user event scripts that set the address subrecord
s
Did you mean user event on credit memo or ??
b
on the credit memo
s
there’s no user event on credit memo record.
I finally use a work around is that to transform record from suitelet and client script to call suitelet when button is clicked