I have the following code: record.submitFields({...
# suitescript
s
I have the following code: record.submitFields({ type: 'customrecord_property_record', id: _id, values: {_field : _new_value} }) ; the _field contain the Netsuite field I want to update, _field is variable. How can I do that ?
a
Copy code
record.submitFields({ type: 'customrecord_property_record',
     id: _id,
     values: {[_field] : _new_value}
 });
s
wow
n
Hopefully you're not hammering the record updating one field at a time 😄
s
Unfortunately it's not working
d
You can declare seperate object outside Then assign all key and values outside first Then assign the object in values property
Follow Anthony response to set key for your objects
b
Computed property names is a feature of suitescript 2.1
👍 1
s
My fault. Anthony is right Problem was on the chair
👍 1
😂 4