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
viswadaviswada 

How to stop Standard Button functionality.

HI,

 

           I  Have Create one button like  Done button ( through buttons and links )  and I provide  functionality for that buton , suppose  once Done buttons Clicked on   the edit button  shoild not work  i can i  stop this  ,plz let me  informatiion  Know   how to  implement

 

Thanks,,,,,,

Best Answer chosen by Admin (Salesforce Developers) 
Rajesh_ShahRajesh_Shah

You can create 2 record types - Before Done and After Done and also create 2 separate layouts for each record type. In the After Done page layout, remove the Edit button and also make all fields read only.

 

Now, when you click on the Done button, you can update the record type from Before Done to After Done. This can be done by writing a onclickJavascript on the button or a VF page. Alternatively, you can also create a field to indicate BEfore Done and Done status and write a workflow which update the Recordtype when the value changes to Done.