[Solved] Datamapper difference between record.fields.FIELD1 and record.FIELD1

Is there any documentation on the subject?

I’ve noticed that when using a JSON type field I can’t set values directly but I must use the fields property.

record.FIELD1 = { name: 'Jhon' } // won't work
record.fields.FIELD1 = { name: 'Jhon' } // work

How does normal fields work when accessing them directly (record.FIELD1) or through the fields property (record.fields.FIELD1)?
Is there anything else that should be known on the matter?

Is there any other valuable information on the matter?

OL-Connect 2023.1.0

Other fields are set in the same way, these are stored under record.fields. In addition there is the record.tables which holds the detail tables of your data model.

To access data we created shortcuts to access the fields and tables. In this case you can omit the “fields” or “tables”.

See also:

Hope this helps,


PS. I noticed that the respective page in the Data Mapper helper is not up-to-date. Will ask our documentation department to synchronize it.

1 Like

I also noticed that the documentation has already been updated!