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
sfdc_dev123sfdc_dev123 

Record type issue

Hi,

 

in my sobject have record types when i select record type and creating a record in detail page

the record type showing record type name ok  fine. But it has change link clicking on this link

we can change the record types Is it possible to how to avoid this process or hide the change link.

 

 

 

Thank you. 

Best Answer chosen by Admin (Salesforce Developers) 
sourav046sourav046

See ,if you have record types you'll be  asked to select your desired record type .At the same time you'll have an option to change the record type if you have selected it mistakenly .

 

If you want to remove the Change link you must create a custom Visualforce page to display your records .

 

The question is why you want to remove the Change link ?

If the reason is you want to prevent a record from editing ,you can better write a validation rule for editing prevention .

 

/*If this answer resolves your query,mark it as resolved */

All Answers

sourav046sourav046

See ,if you have record types you'll be  asked to select your desired record type .At the same time you'll have an option to change the record type if you have selected it mistakenly .

 

If you want to remove the Change link you must create a custom Visualforce page to display your records .

 

The question is why you want to remove the Change link ?

If the reason is you want to prevent a record from editing ,you can better write a validation rule for editing prevention .

 

/*If this answer resolves your query,mark it as resolved */

This was selected as the best answer
sfdc_dev123sfdc_dev123

Hi sourav,

 

 

Yes you are right Thank you for reply. But I want to read only permission for all users even admin only

is it possible to setting in page lay outs or the way is validation rule only.

 

 

 

Thank you

sourav046sourav046

No .For permission you must change your OWD settings .

 

Now problem is that the Admin profile has Modify all permission .

That means regardless of any OWD settings the Admin can Read/Write any record .

 

You can do one thing to restrict the record from being edited by Non-Admin users .Set the OWD for that object as Public Read only and Grant Access Hierarchy unchecked .For doing this all user can only read your records but cannot edit (even users whose roles are above your role) except Admin .Admin can Read/Write because of Modify All .

 

But if you use a validation rule to restrict record from being edited that will allow no one to edit this record and save again .Remember in this case Admin also cannot edit an exixting record not even you(record owner ) .The validation rule is needed to be written when a record ISCHANGED() the system throws an exception .

 

sfdc_dev123sfdc_dev123

 

 

 

Thank you sourav.