I'm using record.attach in 2.0 successfully: file ...
# suitescript
m
I'm using record.attach in 2.0 successfully: file attaches to the record as expected. When using record.attach in 2.1: I don't receive an error, record.attach seems to execute & doesn't actually attach the file to the record, script moves on as if it didn't fail. Are there known issues or nuances with record.attach in 2.1?
Ex.:
record.attach({record: {type: 'file', id: fileId}, to: {type: recordType, id: recordId}});
n
What's the value of recordType variable?
m
any of 'purchaseorder', 'transferorder', 'intercompanytransferorder'
n
try "transaction" instead
m
no good. same result using
to:{type: 'transaction', id: recordId}
as
to:{type: 'purchaseorder', id: recordId}
both work in 2.0, neither work in 2.1
🤔 1
support ticket it is. ¯\_(ツ)_/¯
was using 2.1 to take advantage of startsWith() rather than using lastIndexOf() in a few places