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
Rachel LinderRachel Linder 

How Do I Create A New Case Button on the related list on opportunities

Hi There,
We have a related list on the opportunities to cases. What we would like to do is have people click a button called "New Case" that shows on the case related list. Can this be done? And if so how is it done? Do I need to create a lookup to the opportunity and do i need to write some special code to do this. Thanks.
Rachel
Sonam_SFDCSonam_SFDC
Yes, so what I understand is that there is a relationship you have between an opportunity and case - so you can go to the Opportunity pagelayout - clisk on edit - go to the case related list > select the setting icon(spaner) > select the New check box and you should be able to get the new button on the case related list
Rachel LinderRachel Linder
I tried the steps suggested above and i cannot see the new check box .....
SonamSonam (Salesforce Developers) 
Could you please share a screenshot as to where you are checking for the new checkbox.. also, show the full opportunity detail page..
Rachel LinderRachel Linder
Hi Sonam,
The first screent shot is the layout page. I a clicking on the wrench. The second picture is what I see when I choose the wrench. User-added image

User-added image
SonamSonam (Salesforce Developers) 
Got it, so its the standard funtionality you are using.On the standard Opportunity detal page, you would not be able to get the new case button, reason being, there is no direct relationship between the two object.

However, I did find a workaround if that would work for you.

You could use the global action : new case to give the functionality to users to be able to create a case from the Opportunity page itself.

screenshots below for reference:

User-added imageUser-added image
Hope this helps!