This junction object is difficult to configure #221
-
Hello all I'm 8 hours into trying to plot one relationship and I'm calling in reinforcements. Thanks in advance for the assistance. Here is what I am trying to do: I have a Person org. Accounts are both traditional accounts and people accounts. Accounts are 1:many with patients. Patients have a master-detail relationship with accounts. On Accounts, I can successfully see both patients (DOB) and Orders (date of entry) on the timeline. However, I've tried every which way including changing the lightning page to parent record from "Use this patient" to account owner. When I change it to account owner it shows all orders and all patients on a selected patient (not ideal). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Reinforcements have arrived. The config guide is available here that discusses some nuances but since you may have already looked at it we'll look at your specific example. Let me just understand this a little better.
So when you view the custom object Patient__c you see a master detail relationship like the one below.
So when you view the Order object you see a lookup relationship to Patient__c like the one below? Let's assume I have understood correctly. Add look at the steps needed to plot Orders on the Patient object. Step 1: Identify the relationship name that defines how the parent and child Objects are linked. In the above use case I want to plot Orders on the Patient object so I drill down on the field in step 2 above. Step 2: Make a note of the value in the Child Relationship Name field. In the above screen you can see Orders but note that for custom relationships your value might be different. Step 3. Decide where you want to plot Orders in the timeline. This is typically a field on the child object itself. Looks like you wanted the Order Start Date which maps to the API name EffectiveDate Step 4: Decide which field value to appear when we plot on the timeline. Let's pick the Order Number in this example - you can change it if you like. Again this is typically a field on the child object. Step 5: Create a new Timeline_Config__mdt record. Then refresh the browser. Logging out and back in in necessary. To see Orders related to Patients by dragging the Time Warp component into the Patient page layout. |
Beta Was this translation helpful? Give feedback.
-
@deejay-hub I've created a monster! When I showed my test users what was accomplished they asked for more! And I didn't think it was going to be a big ask given that I had already completed the tasks for parent/child objects. But first a background to remind you:
I have successfully shown on a timeline Account with patients AND orders AND Events. I have successfully shown patients and only their patient's orders, and Events. And now the problem statement. I also have contacts which are not Accounts. The contact roles are secondary owner, trainer, and referring vet. These are look-ups to the Patient__c object. For these contacts I can show the patients associated to the contact and by the different icon, the contact role. Below is an example of where somebody is a secondary owner of Lucky, and the referring vet for Kelly Cat2. What I cannot get to populate are the orders associated to Lucky and Cat2 for the various contacts. I know this is because there is no lookup to secondary, trainer, and referring vet on the Order__c object. But I also read I can use dot notation where a contact and lookup patient, and then display Order__c. Here is metadata mapping that works to show secondary owner and patients. Here is the metadata that works to show patients to orders. Here is where I am struggling with dot notation and the linkage to show Orders via the Patient__c using the existing patients__r relationship between Order and Patient. What am I missing? |
Beta Was this translation helpful? Give feedback.
-
It's hard to tell from your description what your setup is. But let me give you a good rule of thumb. When deciding if it's possible to plot an object...navigate to the page layout of the parent and look for a related list that corresponds to the child object you want to plot. If you find one...Time Warp can plot it. If not it can't. Dot notation is for traversing field values like a formula fields. I suspect your Parent does not have a direct relationship to the object you're trying to plot. Since the same vet and trainer can be on multiple Patients it's hard to see what you're trying to accomplish. (The only exception is the Account to Task/Event/Email and Call. Indirect relationships are supported here by virtue of the fact that Salesforce will populate Open Activities and Activity History objects with grandchild records.) |
Beta Was this translation helpful? Give feedback.
Reinforcements have arrived. The config guide is available here that discusses some nuances but since you may have already looked at it we'll look at your specific example.
Let me just understand this a little better.
So when you view the custom object Patient__c you see a master detail relationship like the one below.