I created a plugin that adds the JSON of a record into a history-field every time the record is being saved (with a beforeUpdate-method in lifecycles.js). The idea is to create a history of the record and let the user return to an older version of the record.
The plugin adds a dropdown to the edit-view that lists all the JSONs-strings from the history-field of the current record. If the user selects one of the entries I want to update the current record with the values from the selected JSON-string.
My question is: how to I update all the fields from the current record from a component in the edit-view? I don’t seem to be able to write the data of the current record.