This is a generic question which I couldn't find enough data online. I have a batch job that runs once every week. This job updates Contact records based on updates on the parent Account.
Scenario: For instance, if the batch job started executing at 4:00 Am PST. And by scope has almost 100,000 Contacts. One random user opens a Contact record at around 4:01 Am PST, which is already in the batch's scope but yet to get executed (future batch chunk), and commit to the database.
Questions:
- Will the Contact record get updated (committed to the database) with the changes from the user and comes out of the batch's scope?
- Contact gets updated with user changes, but still remains in the batch's scope and get executed and recommitted to the database with new changes based on previous Contact value?
- Contact gets updated with user changes, but still remains in the batch's scope and get executed and recommitted to the database with new changes based on the new updates(from user) that exist in the database?