+ Start a Discussion

How to make the complete record read only??

Hi All,


I have a custom object, I need to make the record as read only based on the value of a particular custom picklist field..for a particular profile...


For Ex:


I have an Object says: Custom_Object__c

Custom Field is: Picklist__c


as i save the record with the Picklist__c='Changed' for a particular profile.. my complete record should become read only.. is that can be achieved...?




A more useful option is to create two recordtypes and assign different page layouts to the two recordtypes.

1. One is read/write

2. One is read-only on all or specific fields

And a workflow to when status picklist is changed to the specific status, set record type to "readonly"

And all other statuses would change it to the read/write record type.





Could you please elaborate more in this... this seems more interesting.. please let me know how can i implement this....

you can share records programatically based on the criteria. Every custom object has a related object. Suppose your custom object is CustomObject__c then share object will be CustomObject__share.
You have to create records of the share object that will contain information about the level of access that the specified user or group has been granted for a share sObject, the user or group IDs to which you are granting access and the id of the object record.

Hope this helps you.