Skip to main content

Hi, 

Is it possible to lock records which are being processed by Batch?

Or Is there a way to restrict the user from edit when the records are processed through batch?

Thanks in advance 

 

4 answers
  1. Jul 16, 2019, 3:45 AM
    Hi Bajrang,

    Follow the below steps - 

    1. create one new field on Object say "Is Checked?"

    2.Update this field to TRUE in your Batch Job.

    3.Write a Validation Rule with code as below - 

      PRIORVALUE( Is_Checked__c) = TRUE && Is_Checked__c = TRUE

    If someone tries to edit this record when Is checked = true, it will throw an error.

    Raji M
0/9000