1

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:

enter image description here

1

Another way you could do this would be by using a custom link on your cases page.

  1. Go to Customize->Cases->Buttons, Links, Actions

  2. Create a New Button/Link.

  3. Behavior : Display in a new Window

  4. URL: "/{!Contact.CustomerId__c}" (You might have to replace the exact name based on your object name)

  5. Save

Then go to the page layout of the Case Object and add this new button/link there.

  • Wow that worked! I used another behavior (display in same window with side bar). Can you explain why the url is for Contact.CustomerId__c? I tried Contact.Customer__c but that didn't work.. – Jolanda Verhoef Mar 20 '14 at 12:20
  • 1
    When you use just Customer__c that refers to the Name or whatever is the default parameter for Customer. But to access a record from the URL you need the unique 15-char record id associated with that customer record. – RohanC Mar 20 '14 at 12:27
  • Another question: Using the Link the scenario works like a charm. When I use a button (with the same settings) it is opened over the current tab. Any ideas? – Jolanda Verhoef Mar 20 '14 at 12:32
0

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

  • The Case & Contact objects are standard SF objects, and the lookup for a Contact on the Case page is a standard Field. I cannot (and don't want to) change this lookup into a master detail relationship.. Can you please answer the question given that the data model is fixed? – Jolanda Verhoef Mar 20 '14 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.