Download EPiServer Commerce User Guide

Transcript
Adding a 1 to Many Relation | 169
Adding a 1 to Many Relation
Business Foundation objects allow a user to specify "1 to many" relationships. For example, if you have one organization, you can relate many types of data to that organization, such as multiple contacts, addresses, or organizational units or divisions within an organization. Within a 1:N relationship, the business object you selected will be "1."
In the example below, 1 = Organization and N = related objects such as Address, Contact, CreditCard, etc.
To add a 1 to many relationship to a business object, you will need to create a new business object or use an existing one. On the Business Object Customization page, click on 1:N Relations.
Click on New Relation "one to many" to create a new relation.
Under General Info, the Primary Object Organization is automatically set to Organization.
1. Select a Related Object to relate an the Organization object in the dropdown.
2. The Object section below General Info will have a different title based on Related Object you selected. For example, if you selected "Address," the title would be "Object 'Address'".
3. Enter in a Field Name and Friendly Name. They are autopopulated already using the system name of the business object.
Both names must be unique and not be the same as an existing field. The Field Name cannot contact spaces or special characters, only letters, numbers, and underscores.
4. Checkmark the box Allow Nulls if you do not want this to be a required field the user fill in while editing a form. Otherwise, uncheck the box to make it a required field.
5. Under Add Field To, checkmark the Forms you want the field to render in, such as the Edit Form (to enter and submit information) or View Form (read information only).
© EPiServer AB