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
EldonEldon 

Grey out createPDF button or show error message on button click in the quote object when a checkbox is ticked

Hi,

I am trying to grey out(disable) createPDF button(std button) in the quote object when a checkbox value is ticked. Is there any way to do this? Also is it possible to put an error message on clicking that std button when checkbox value is ticked.

PS: What i did currently as a workarround is to create 2 different recordtype with one not containing createPDF button and one contains it and assign it according to the checkbox value in quote trigger.

Thanks
Waqar Hussain SFWaqar Hussain SF
Hi Eldon,

You can not alter standard Salesforce Create PDF button on quotes. The work around could be 

- Create a custom button and call onclick javascript button 
- If the checkbox is checked show an alert message
- If checkbox is not checed, create quote pdf using apex