I have created a custom button for creating a contract from an opportunity. I would like to hide this button unless the opportunity stage is equal to Closed/Won. Is that possible? How can I implement that? I have read about record types but, I do not really know how to apply it for this porpose. Thanks in advance.
2 Answers
Yes, this is possible through record types and page layouts.
To make this work, you will need at least two Opportunity record types, including one record type for closed/Won opportunities.
Create a workflow rule and field update to update the record type based on when the opportunity changes to closed/won.
Next, create page layouts and use page layout assignments by record type to dictate when the button appears.
Mike Gerholdt, aka button click admin extraordinaire, has written a blog post on extending this functionality throughout the sales process here: http://buttonclickadmin.com/monday-am-admin-the-goose-and-the-gander/
-
Hello James, thanks its working but, is there any option to force users to use always the same initial record type? I have seen that, by default, when the user tries to create a new opportunity the system prompts to select one of the record types availables. It is possible to avoid this screen and force the using of one specific record type? Thanks Commented Feb 11, 2014 at 15:43
-
I haven't tried this out, or it's been awhile since I have, so I'm not 100% on this, but you should be able to skip record types by setting a "Default Record Type" on the Opportunity. This would be at either the profile level or on each user record. Commented Feb 11, 2014 at 15:51
Alternatively, you could just have your custom button be a Javascript button and have it check to see if criteria are met to do the creation of a contract, otherwise display an error popup.