AgileApps Support Wiki Pre Release

Difference between revisions of "Common:Object Construction"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
'''Define an object:'''
'''Define an object:'''
# Click '''[Define Fields]'''
# Click '''[Define Fields]'''
#:
# Specify plural and single labels for the object name.
# For the [[Cases Object]], specify the label to use for the built-in <tt>subject</tt> and <tt>description</tt> fields (or use the defaults).
#:
#:
# Define up to 10 fields, to get started. (You can add more later.) For each field, specify:
# Define up to 10 fields, to get started. (You can add more later.) For each field, specify:
#* '''Field Label -''' The label users will see  
#* '''Field Label -''' The label users will see.
#* '''Internal Field Name -''' The internal reference name. (Created for you. Modifiable, but generally best left alone.)
#* '''Internal Field Name -''' The internal reference name. (Created for you. Modifiable, but generally best left alone.)
#* '''Field Type -'''  Pick one of the many choices
#* '''Field Type -'''  Pick one of the many choices

Revision as of 01:31, 18 October 2013

Define an object:

  1. Click [Define Fields]
  2. Specify plural and single labels for the object name.
  3. For the Cases Object, specify the label to use for the built-in subject and description fields (or use the defaults).
  4. Define up to 10 fields, to get started. (You can add more later.) For each field, specify:
    • Field Label - The label users will see.
    • Internal Field Name - The internal reference name. (Created for you. Modifiable, but generally best left alone.)
    • Field Type - Pick one of the many choices
  5. Follow the prompts to add additional information, depending on the field type.
  6. When done defining fields, click [Save]

For more, click [Add additional Object] and repeat the process.

Establish relationships between objects:

  1. Click [Add a Relationship]
  2. Under Relationships select the objects to fill in the blanks:
    Between __{baseObject}__ and __{relatedObject}__
  3. Specify the Relationship Type:
    • One to Many - One {baseObject} record can be related to many {relatedObject} records
      For example: One Order can have many OrderItems.
      Note:
      To make a One to One relationship, construct it as One to Many, and add a Unique Index to the target object to ensure that only one such record can ever exist.
    • Many to Many - One {baseObject} record can be related to many {relatedObject} records, and each of the {relatedObject} records can be related to many {baseObject} records
      For example: One Order can have many Tags, and one Tag can be applied to many Orders.
The relationships cause Lookup fields to be added to the objects, with names like "related_to_X". For example, the OrderItems object will have a field named related_to_Orders.