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
arun kumar.ax887arun kumar.ax887 

How to make the Standard Field Uneditable

 

Hi,

 

    I have a requirement where in I need to make the Standard Field of Opportunity i.e., Opportunity Name as uneditable.

Can any one suggest a solution for this requirement using an Apex class or functionally.

 

 

 

 

Regards

 

Arun Kumar 

Pradeep_NavatarPradeep_Navatar

Since Opportunity Name is a required field so you can not make it read only, however other fields can be read only from page layout and field accessibility option available on field detail page.

bob_buzzardbob_buzzard

You can't stop the user editing the field on the page (not with some unsupported/fragile javascript trickery anyway), but you could write a trigger that detects if the name has changed and returns an error to the user if that is the case.