Support › MB Relationships › Linking CPTs togetherResolved
Hi Anh -
I've successfully set up a couple of CPTs and have the ability to link them on the backend - see here:
The goal of this website is to create records that can later be updated - think of it as a sales pipeline project - like Pipedrive or similiar.
What isn't clear to me is how to identify linked records so I can either display them or update them using Frontend Submission.
Custom Field Groups:
The way the flow works is like this:
First Deals are created. These are preliminary records. Ideally, all deals turn into sales, but it is possible that deals never advance beyond this initial step. Deals move through many steps before they can be completed.
Second, once a Deal reaches a certain Status, then a Deal triggers a Package. The Package is a complete set of info needed for buyers to decide to purchase something. Package details are many and complex and use most of the different field types in the MB Builder.
The sales cycle can be long - so over time employees continuously work the deals/packages and update the record with Activities. All Deals/Packages will have something recorded in Activities, but some will have more than others.
In terms of Relationships - everything is One to One except for People. That's becuase people can be either a buyer or a seller and can make more than one puchase. It looks something like this:
So really I need to know:
The MB Relationships extension automatically creates 2 meta boxes for 2 sides of each relationship with these IDs:
So you might need to use these IDs to include into the front-end forms to let users select a post/user to make a connection.
To display connected items in the front end, you need to code a little bit. The code is provided in the docs. As you're using Beaver Builder, I'd suggest creating a shortcode to display related items, then insert the shortcode into a text module.