Difference between revisions of "Common:Object Construction"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 20: Line 20:
#* '''Many to Many -''' One <tt>{baseObject}</tt> record can be related to many <tt>{relatedObject}</tt> records, and each of the <tt>{relatedObject}</tt> records can be related to many <tt>{baseObject}</tt> records
#* '''Many to Many -''' One <tt>{baseObject}</tt> record can be related to many <tt>{relatedObject}</tt> records, and each of the <tt>{relatedObject}</tt> records can be related to many <tt>{baseObject}</tt> records
#*: For example: One ''Order'' can have many ''Tags'', and one ''Tag'' can be applied to many ''Orders''.
#*: For example: One ''Order'' can have many ''Tags'', and one ''Tag'' can be applied to many ''Orders''.
#: The objects are now connected by [[Lookup]] fields.<br>(They'll have names like "related_to_Orders". )
#:
#:The objects are now connected by [[Lookup]] fields, which will have names like "related_to_Orders".

Revision as of 20:57, 22 October 2012

  1. Click [Define Fields]
  2. 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
  3. Follow the prompts to add additional information, depending on the field type.
  4. When done defining fields, click [Save]

To add additional objects, click [Add an Object] and repeat the process.

Next, establish relationships between the application 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.
    • 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 objects are now connected by Lookup fields, which will have names like "related_to_Orders".