App Ribbons normally show records associated with the current app. For example, if you look at the Opportunities app, its app ribbons show all the related activities and transactions for each opportunity.
The Contacts app ribbons, however, also shows transactions associated with the contact's customer (or entity). Since there is a difference between contacts and customers, configuring this can be tricky.
In this article, we will show an example of how to show records associated to the customer in the Contacts App Ribbons.
In this scenario, we will use the Credit Memo table as an example. Credit Memo is a transaction which is associated to a customer, not a contact.
For simplicity's sake, this article will not go into explaining how to use Credit Memos, or how to create the Credit Memo app. This article will assume the custom app already exists.
The important thing to remember is that there must be a Customer dropdown field in your table. In the Credit Memo table, there is a dropdown field called Customer, which is connected to the Entity table. For more information on Entities and how that relates to Customers, see our article "The Entity Table".
Create the App Ribbon in your App
The first step is to create the app ribbon you want to add to the Contacts app. This needs to be done in your custom app. In our scenario, that's the Credit Memo app.
Click the vertical ellipsis [
⋮] on your app and click Manage. In our scenario, it's the Credit Memo app.
Click App Ribbons on the left menu.
Click Create App Ribbon.
For the first step for how the base table relates to tables in other apps:
CreditMemo Fields: Customer (hold's the customer's Record ID)
Join to Table: Contacts
Join on Field: Entity
For the rest of the app ribbon configuration, fill it out as you normally would when setting up an app ribbon and then Save it.
Select Record Summary on the left menu.
Edit the Default Summary, add in some text, and then Save it.
Your App Ribbon is configured, but now we need to generate it. Open up the Contacts app.
Select a Contact with a customer you know has a record in your app.
In the Contact's app ribbons, select your newly created app ribbon. In the below image, it's the Credit Memos app ribbon. This will generate the App Ribbon screen for you to edit.
You will note the app ribbon screen is not configured to show details of your record, but it does automatically show all the records that belong to your Contact's customer.
Customize the App Ribbon Screen
Now to edit the screen for your new app ribbon screen.
Manage your app again. In our scenario, it's the Credit Memo app.
It will default to your Screens. There will be a new screen generated for the App Ribbons. In our scenario, it's called Panel - Credit Memo's (Contacts). Customize this screen.
This is a published screen, so you will need to Edit it to create a new draft version.
Go into the Columns of the generated List object.
Now customize the grid List to how you want, as well as the entire screen.
Once you finish customizing this screen, you're done. For reference, the two added text objects on the screen will hold the following values:
Customer: This will be the name of the dropdown field of your table, and hold's the Record ID of the Customer.
ParentID: This will hold the Record ID of the Contact that is currently being viewed.
When you check the view filter for the List object, you will see it is filtering using the Customer object, which was automatically set when you created the App Ribbon.
For more information, please see our article "Customize the Screen Displayed in an App Ribbon".