Apex Designer Documentation
What's New
Getting Started
Projects
Business Objects
Processes
User Interfaces
App Behaviors
Files
Dependencies
Project Settings
Libraries
Patterns and Best Practices
App Showcase
Frequently Asked Questions

Business Object Relationships

Create relationships between business objects to build a powerful information model.

Blank Profile Image
Written by Keith Miller
Updated 2 years ago
2 min read

Relationships are critical to the design of an app's information model. Getting the relationships right as early as possible reduces expensive rework later in the process.

Relationship Types

There are four types of relationships in Apex Designer:

  1. Has many is the relationship that you probably think of first. An example is "a supplier has many locations".
  2. Belongs to is the opposite of has many. An example is "a location belongs to a supplier".
  3. Has one is a special case of has many. An example is "a supplier has one legal address".
  4. References is very similar to belongs to but communicates a different behavior. An example is "a supplier references  an industry category". If the industry category was deleted, you would not expect the supplier to be deleted. Conversely, if a supplier was deleted, you would expect its locations to be deleted because "a location belongs to a supplier".

Creating Relationships

Relationships are in the top center section the Business Object page. You can add a relationship and create a business object at the same time (be sure to enter the singular (location) instead of the plural (locations) when creating a relationship and a business object):

Relationships typeahead with create new

You can also create a relationship with an existing business object:

Relationships typeahead with existing

Business Object Relationship Dialog

When you create a new relationship or click on an existing one, the Business Object Relationship dialog is displayed:

Business object relationship dialog

There are two rows displayed - one each each direction. You read them as sentences from right to left:

  • a Location has many contacts of type Contact
  • a Contact belongs to a location of type Location

You can click on the business object name to open it.

You can change the relationship type (from has many to has one for example) and the relationship name (contacts to supportContacts for example).

The Delete Behavior field has four options:

Delete action options

You can delete the relationship by clicking the Delete icon button at the bottom of the dialog.

Multiple Relationships with One Business Object

Consider this example:

  • a supplier has one mailing address
  • a supplier has one legal address

That is actually two distinct relationships between supplier and address. The relationships look like this:

Mailing address relationship example

Legal address relationship example

The belongs to relationship names are verbose but they won't be misunderstood :).

What About Many To Many Relationships?

What about the example "a student has many classes and a class has many students"? Many to many relationships are represented by adding a linking business object. It could be called "Enrollment" and it would belong to both Student and Class:

Student has many enrollments relationships

Class has many enrollments relationship

Business Objects Diagram

Don't forget that you can visualize your business object relationships in a diagram form (see Business Objects Diagram for details):

Business objects diagram

Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2024 Apex Process Consultants