You need to sign in to do that
Don't have an account?

Object Level Lock ?
Just want to confirm, there is not much option to lock Object in apex during DML? i guess trigger locks the record by default during execution but not much locking option in Apex controller level ?
If anybody tried any work around let me know,
Thanks
Ram
You can use the FOR UPDATE option on the query to lock the rows.
Thanks simion
1. does batch process automatically locks records returned by query locator ?.
2. I just got this exception few times " UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record ", I'm assuming this is due to some triggers running back ground.
Thanks
Ram