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
Usha TDUsha TD 

how we can hide the custom button in detail page in salesforce based on field value??

Best Answer chosen by Usha TD
Rowallim TechnologyRowallim Technology
Hi Usha
It is not possible with a standard salesforce resources. If you have an "onclick javascript" button you could implement some validation based on the field value.
Regards

All Answers

Apoorv Saxena 4Apoorv Saxena 4
Hi Usha,

To acheive this you'' need to create a new RecordType and associate a new Page Layout (without your custom button) with that record type.
Now, on field update you can associate a workflow, that will change the 'RecordType' of your record as soon the the field updates(that will be the criteria of your workflow rule to fire), and on the page layout associated with that recordtype you can remove the button that you dont want your users to see.

Hope this helps!
Please mark this question as Solved if this answers your question.

Thanks,
Apoorv

 
Rowallim TechnologyRowallim Technology
Hi Usha
It is not possible with a standard salesforce resources. If you have an "onclick javascript" button you could implement some validation based on the field value.
Regards
This was selected as the best answer
Usha TDUsha TD
Plese give me one example