Have more questions? Submit a request

Many-to-Many Relationships

Viewpath Support -

Article: Displaying the same Viewpath Project in multiple objects in Salesforce

Viewpath App Default Relationships

When you install the Viewpath Application from the AppExchange, you can add "Viewpath Projects" as a "Related Lists" item in the Accounts and Opportunities objects or on a custom object. This allows you to create a new Viewpath Project or connect to an existing project.

The limitation of this feature is that once a Viewpath Project is associated with one object, that same project cannot be associated with another object through the Related Lists item.

You can create a Many-to-Many Lookup item which will allow you to display the same Viewpath Project on multiple Objects. 

Creating a Many-to-Many Lookup

To associate many projects to many custom/standard objects, you need a joiner object that facilitates this two way relationship. In essence, this object  will pull data from the Viewpath Project object and deliver it to the destination object. Note that you will need to create a unique custom object for each instance. For example, you will need a custom object for Accounts and another for Opportunities. These will show as items on the bottom of each record within Accounts, Opportunities or any other object for which you have set this up.

             CustomObject2.jpg

To create the new object:

  • Navigate to Setup > App Setup > Create > Objects
  • Create a new object called VP_Project_to_<your_object_name>

           CustomObject.jpg

 Comments on what options on the above screenshot and their suggested values:

  1. Name should be to a specific object, e.g: VP_Project_to_Accounts or VP_Project_to_OurCustomObject
  2. Data Type = Text (if you choose "Auto-number" you will not see the name of the project from within the object.)
  3. Optional Features = Leave unchecked
  4. Deployment Status = Deployed
  5. Object Creation Options = Leave unchecked
  • Add a custom lookup field that will pull from the list of Viewpath Projects
    • Select the type "Lookup Relationship"
    • Select "Viewpath Project" in the "related to" field
    • Choose a field name (e.g. "Viewpath Project Accts") and select your desired security settings
    • Leave the "add field" checkbox on the "add reference field to Page Layouts" for all layouts that you would like the ability to link to the Viewpath project from.
  • Add another custom lookup field that will display the Viewpath Projects in your target object
    • Select the type "Lookup Relationship"
    • Select your desired target object (e.g. "Account") in the "related to" field
    • Choose a field name (e.g. "Account VP") and select your desired security settings

      Note: You may uncheck the "add field" checkbox on the "add reference field to Page Layouts". Viewpath currently does not support standard Salesforce layouts on our edit and create pages.
    • Leave the "Add Related List" checkbox selected to add the related list to the desired layouts. It can also be appended to users personal customizations with the checkbox at the bottom.

You now have a custom joiner object that can be used to link many projects to many standard objects. When you open a record in the object that you specified when creating the first custom field above, scroll to the bottom of the page to find the section called "VP_Project_to_ObjectName." Click on the "New" button then search for the desired Viewpath Project to display in this section.

For more details on the types of relationships between Salesforce objects, see the Salesforce documentation.

Have more questions? Submit a request

Comments 0

VIEWPATH

We have a passion for Customer Success - let us know if you have ideas!