+ Start a Discussion

How to Lock the Record using RecordTypes?



How to lock the record by using record types.


can you explai the steps.



Jeff MayJeff May

One of the uses of Record Types is to associate page layouts.  You can create a page layout with Read-Only fields, associate it with the ReadOnly Record type.  When a record of that record Type is displayed, it will use the ReadOnly page layout.

Hi JeffM,

Thanks for immediate response,

in account pagelayout, change the AccountNumber field to Read-only and then save it.
my recordname is john and accountnumber is 897654329.
after that in developer console i type a query


i got all the records.

is it correct way or not teach me.

Jeff MayJeff May

That is correct. Now, when users view those records, they will not be able to edit the AccountNumber field.  You will always be able to write a SELECT to retrieve records.


you can lock the record when the record type changes by creating a workflow approval process.

Or, you can create a page layout where all the field is read-only in page layout and set the page assignment to the record type.



Hi eugene_bm

can you explain the steps

to lock the record when the record type changes by creating a workflow approval process.


Hey, You have to know first if approval process really is the solution for your request.

Workflow Approval process, as it implies, it will go to approval to lock/unlock the record.



but just to give you idea, heres how you can do it:

1. Go to App Setup>Create>Workflow and Approvals>Approval Process

2. Select the object where you want to create the approval process.

3. Create new and follow the step by step procedure.