```record.create({ type: 'customrecord_pla...
# suitescript
r
Copy code
record.create({
        type: 'customrecord_pla_usage_log',
        isDynamic: true
      });

record.setValue({
        fieldId: 'custrecord_pla_execution_logs',
        value: error.toString()
      });
TypeError: record.setValue is not a function, why? i have used this to set the error log record in try catch(error) i have defined module correctly too, why not?
e
record
is most likely used in your define for
N/record
r
i did include it
e
.setValue
is used with the record instance retunred from record.create or record.load
r
i know
i don't know why isn't it working
i just simply created a record with record.create and then record.setValue
and it shows error
e
Copy code
const myRecord = record.create({
    type: 'customrecord_pla_usage_log',
    isDynamic: true
});

myRecord.setValue({
    fieldId: 'custrecord_pla_execution_logs',
    value: error.toString()
});
r
oohhh so dumb
sorry
e
not dumb, it happens
r
thank you so much