function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnnuAnnu 

Regarding Batch Job

according to the requiremnt given, we have to write a batch  job which locks the records from updating for all the users when a perticual condition is met. I have created a new recordtype and a new pagelayout in which all the fields are locked and pagelayout is assigned to new RecordType. Whenever a perticular condition becomes true, this new Recordtype is Assigned to the record.

 

problem is, the records should be locked for editing for all the users except for Administrator. i.e. Admin should be able to edit those records. how can we meet this requirement? this is Urgent, any idea?

sherodsherod

Salesforce can manage this kind of functionality for you using its inbuild security model.

 

Your current approach doesn't seem right to me, you need to go and look up Organisational wide Sharing and Profiles/Roles I suspect.