My Case has a lookup-field for Contact, which in turn has a lookup-field for a custom object Customer. How can I directly open the Customer record in a subtab from the Case detail page?
So I'd like to have a field on the standard Case page layout which shows the Customer name, and when you click on it the customer record opens in a subtab.
It should look like this:
Attribution to: Jolanda Verhoef
Possible Suggestion/Solution #1
What you need is a junction object. In this case you'd need to make the Contact your junction object.
The junction object would have master-detail relationships with the 2 objects you want to connect ( in this case "Case" and "Customer")
Case --master detail relationship --> Contact <-- master detail relationship -- Customer
This would then allow you to access the customer records from the case object.
I hope this answers your question. I'm unable to see the image you've posted for some reason.
If you'd like a more detailed, step-by-step solution take a look at the Relationships chapter in Force.com fundamentals
Attribution to: RohanC
Possible Suggestion/Solution #2
Another way you could do this would be by using a custom link on your cases page.
Go to Customize->Cases->Buttons, Links, Actions
Create a New Button/Link.
Behavior : Display in a new Window
URL: "/{!Contact.CustomerId__c}" (You might have to replace the exact name based on your object name)
Save
Then go to the page layout of the Case Object and add this new button/link there.
Attribution to: RohanC
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30545