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
SunilKumarSunilKumar 

I have a picklist field called entry__C with 5 values in account object so whenever user create the new record it is editable mode and once record gets saved then it is readonly mode so user cannot edit that record.

I have a picklist field called entry__C with 5 values in account object so whenever user create the new record it is editable mode and once record gets saved then it is readonly mode so user cannot edit that record.Here i am not using any customization like vf page and all
So i have to do it through configuration.

Thanks in advance.
Dheeraj VarmaDheeraj Varma
Hi, 
May be you can look into this post
https://developer.salesforce.com/forums/?id=906F00000008ow0IAA

but readonly is not achieved over there. I dont think there is a way to make the field read only without using custom VF pages.
Dheeraj VarmaDheeraj Varma
One thing you can try to make the fields readonly is recordtypes. Once the record is created it can be be changed to a recordtype let us say 'Created' by using process builder or trigger. The page layout for the 'Created' record type can have the picklist field as readonly. May be you can try this approach along with the validation rule mentioned in the above link to make field uneditable after creation.
Jithesh VasudevanJithesh Vasudevan
Hi Sunil,

I do not think you can do it using configuration if you want to see it as a readonly field after saving.
You can create a new record type and make just that field 'read only' for the users you want and name it DO NOT USE on Account just for the above purpose and use the below trigger,

trigger changeRecordtype on Account (before insert) 
{
  for(Account a:Trigger.new)
  {
    if(<Condition like if the owner is a particular user you are looking for or a particular field has a specific value>)
    {
    
     a.recordtypeId='<(DO NOT USE)recordtypeId>';
    }
  }
}