How do I plot a custom object related to a Person Account? #279
-
The app works great out of the box without configuration. However we are struggling getting objects related to Person Accounts to appear. Any chance we could get an example of the expected setup for a custom object where the lookup relationship is to the Account (IsPersonAccount)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Person Accounts can be tricky since they can be used in Contact and Account lookups. In this example we cover the use case when you want it to be a lookup to the Account. In this example we'll ask Time Warp to plot a custom object called Memo__c (not part of a managed package) related to a Person Account via an Account lookup. Step 1: Create a lookup relationship from Memo__c (the custom object) to the Account object Make sure you note down the Child Relationship Name you used - in this case we used the value Memos Step 2: Make a note of the fields you want to use to plot the record. You can substitute the value for any of the fields in italics Date to Plot on the Timeline: CreatedDate This means we are asking to plot Memo records based on the date they were created using the description field value to see next to the record plotted. The icon and background colour are used to visually represent the record. Step 3: Create (or navigate to existing) a new Person Account record. In our case we're using the name Person Account One. Step 4: Add Time Warp to the page layout. i) Goto -> Setup -> Edit Page on the record detail page ii) Drag the Time Warp component from the left hand palette into the page layout iii) Save then Activate the new page layout. When you navigate back to the page you'll see the following (if a new record). Existing records may already show existing child records. Step 5: Add Time Warp configuration for our new Memo__c child records Goto -> Setup -> Custom Metadata Types Locate the record corresponding to Timeline_Configuration and click the link for Manage Records Here you can see all the child records the Time Warp plots by default. If you scroll down the list you'll see values corresponding to Person_*. These records relate to Person Accounts. You can take a look at some existing records like Person_Cases_Account and Person_Cases_Contact to see how they are configured to plot cases for Person Accounts that cater for the Person Account being in the Account field on the Case OR the Contact field on the Case (hence why there are 2 records). For our use case we want to add a new record for our custom object. Click New and use the values in Step 2 to populate the new record: **Step 6: Create a new child custom object record to test ** Navigate back to the Person Account record created in Step 3. Add a new Memo record (your custom object) Step 7: Refresh Time Warp Click the refresh button in Time Warp to see the newly created child record based on your custom object. The hover details are based on the Compact Layout of the custom object created. To see additional fields just change the compact layout for the custom object. |
Beta Was this translation helpful? Give feedback.
Person Accounts can be tricky since they can be used in Contact and Account lookups. In this example we cover the use case when you want it to be a lookup to the Account.
In this example we'll ask Time Warp to plot a custom object called Memo__c (not part of a managed package) related to a Person Account via an Account lookup.
Step 1: Create a lookup relationship from Memo__c (the custom object) to the Account object
Make sure you note down the Child Relationship Name you used - in this case we used the value Memos
Step 2: Make a note of the fields you want to use to plot the record. You can substitute the value for any of the fields in italics
Date to Plot on the Timeline: CreatedDate
…