Display Target Object Fields for M:M Related Objects with a Custom Relationship
For custom many-to-many relationships, you can view fields from both the child intersection object and the target object in the subview, organized into separate child and parent tabs.
- In the Extension Generator, create a new extension or import an extension for the object you want to configure.
- Select the base object. For example, select Account.
- Select the target object for the custom many-to-many relationship. For example, search for and select Payment.
- Select the required Account-to-Payment many-to-many relationship, then click Add.
- Review the configuration and click Generate Extension.
- Download the generated extension ZIP file.
- In Visual Builder Studio, import the generated extension ZIP file.
-
Locate the tabs parameter in the generated code to control which tabs appear:
bothdisplays both Child and Parent tabs (default).childdisplays only the Child tab.parentdisplays only the Parent tab.
Change this parameter if you want to show just one tab.
- Update the tab titles as needed. For example, rename the first tab to Child and the second tab to Payment.
- Add the Payment subview and panel to the appropriate container layouts.
To configure this for an existing subview:
- Select the base object. For example, select Account.
- Select the target object for the custom many-to-many relationship. For example, search for and select Payment.
- Select the required Account-to-Payment many-to-many relationship, then click Add.
- Review the configuration and click Generate Extension.
- This creates a .zip file containing the required code.
- Manually incorporate the relevant changes from the generated extension into your existing subview implementation. Do not import the generated .zip file, since you have already copied the required code.
- Locate the tabs parameter in the generated code to
control which tabs appear:
bothdisplays both Child and Parent tabs (default).childdisplays only the Child tab.parentdisplays only the Parent tab.
Change this parameter value if you want to show just one tab.
8. Update the tab titles as needed. For example, rename the first tab to Child and the second tab to Payment.
You can now preview the extension. On the Account detail page, open the Payments subview to verify that the child intersection object fields appear on one tab and the target Payment object fields appear on the other tab. Select a record or field in either tab to verify that it navigates to the appropriate record details page.