Behaviour of saveRecord to the recordStore?

I guess the behaviour of saveRecord is like an upsert - am I correct?.

Also, as per docs, if an attribute with an aggregate expression (available ones) is indexed, then every update goes through a differential computation process before the attribute updates itself - is my understanding correct?

I also wanted to see if there are inbuilt facilities to differentiate between insert, update, and upsert - I didn’t find any. If not, then I think it can be managed with my code logic, but just wanted to check if there is anything available.

Thanks

In addition to saveRecord, there is insertRecord (must not exist) and updateRecord (must exist).

Yes, that is correct. Perhaps a simpler way to think about it is that (for the purposes of understanding indexes) update is equivalent to delete followed by insert: first you undo what was already indexed for the previous record, then you index the new record.

Thanks @MMcM. It is helpful :slight_smile: