Update fields of a type

#1

What is the best command or steps to update a specfic field with new value of already created objects in C3 ?
The value of this field is changed in the CanonicalTransform.

0 Likes

#2

Assuming you know the id of the initial object (I call it srcId hereafter), you should use the merge API. You only need to specify the id and the fields you want to modify (the remaining fields will remain untouched).

var obj = Type.make({id: srcId, 
                     modifiedField: modifiedValue});
obj.merge();
0 Likes