Difference between revisions of "Self Reference Lookup"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
Line 46: Line 46:
#Navigate to the object of interest
#Navigate to the object of interest
#In the Forms tab, navigate to the ''Related Information'' section
#In the Forms tab, navigate to the ''Related Information'' section
#Navigate to the ''<object> based Hierarchy View'', click the Edit Related Information [[File:Editlayouticon.gif|link= ]] icon and complete the following information:
#Navigate to the ''<object> based Hierarchy View'', click the Edit Related Information [[File:Editlayouticon.gif|link= ]] icon
#:[[File:Objectbasedhierarchyview.gif|right|thumb]]
# Fill in the information below.
#:[[File:Updaterelatedinformation.gif|right|thumb]]
#Click '''[Save]'''<br>The  <object> based Hierarchy View records are displayed in the Related Information section.
#:;Title:Title of the Related Information section
 
#::*Prepopulated with ''<object> based Hierarchy View''
;Object based Hierarchy View Information:
#::*Optionally, change the Title
:[[File:Objectbasedhierarchyview.gif]]
#:;Select Fields to Display:Select fields in the list of those Available, and click the right-arrow button to move them to the Selected column; Optionally, click the up- or down-arrow buttons to change the order in which the fields appear
:;Title:Title of the Related Information section
#:;Sort By: Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
::*Pre-populated with ''<object> based Hierarchy View''
#:;Additional Sort By:Optionally, choose a second-level sort
::*Optionally, change the Title
#::*Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
:;Fields to Display:Select fields in the list of those Available, and click the right-arrow button to move them to the Selected column; Optionally, click the up- or down-arrow buttons to change the order in which the fields appear
#:;Display Type:Choose from Tree or Tabular; Tree is default
:;Sort By: Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
#::[[File:treeselflookup.gif|none|thumb|Tree]]
:;Additional Sort By:Optionally, choose a second-level sort
#::[[File:tabularselflookup.gif|none|thumb|Tabular]]
::*Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
#::*If Display Type is Tree, the Mode Type option is displayed
:;Display Type:Choose from Tree or Tabular; Tree is default
#::*Choose either Collapsed or Expanded; Collapsed is default
::<table> <tr><td>[[File:treeselflookup.gif|none|frame|Tree]]</td> <td>&nbsp; [[File:tabularselflookup.gif|none|frame|Tabular]]</td> </tr></table>
#:;Scrolling Window Size: Define the number of rows to display by selecting a Scrolling Window Size; Choose from:
::*If Display Type is Tree, the Mode Type option is displayed
#::*No Scrolling, Show all Rows
::*'''Mode Type -''' Collapsed or Expanded; Collapsed is default
#::*5 Records, Scroll Window
:;Scrolling Window Size: Define the number of rows to display by selecting a Scrolling Window Size; Choose from:
#::*10 Records, Scroll Window
::*No Scrolling, Show all Rows
#::*20 Records, Scroll Window
::*5 Records, Scroll Window
#::*30 Records, Scroll Window
::*10 Records, Scroll Window
#::*40 Records, Scroll Window
::*20 Records, Scroll Window
#::*50 Records, Scroll Window
::*30 Records, Scroll Window
#Click '''[Save]'''
::*40 Records, Scroll Window
The  <object> based Hierarchy View records are displayed in the Related Information section.
::*50 Records, Scroll Window


===Delete an Object based Hierarchy View===
===Delete an Object based Hierarchy View===

Revision as of 00:34, 16 August 2011

An Object can contain a Lookup field that references the Object itself (i.e. a self reference). This configuration is used to build record hierarchies (parent-child relationships between records) which are displayed in a Related Information section.

Examples
  • An organization might have multiple subsidiaries, and some of those companies might also have subsidiary companies
  • Employees have reporting relationships, to managers and subordinates
  • In manufacturing, parts in a component might have subcomponents (or be part of of a larger component)
Considerations
  • The new section is named: <object> based Hierarchy View, where <object> is the Lookup Type, or object name; Learn more: About Objects in Lookup Fields
  • The new section is added to all the Forms of the object
  • By default, this new section is hidden
  • When visible, this section displays a hierarchy view of the records
  • A Self Reference Lookup field:
  • Cannot reference itself, only other records in the object
  • Is not supported in Built-in or CRM objects
  • Is not supported in lookups to Built-in or CRM objects
  • Is not supported in Object Inheritance models
  • Can be deleted from the Fields tab in an Object

Add a Self Reference Lookup Field to an Object

  1. Click Designer > Data > Objects > {object}
  2. Click the Fields tab, click the [New Field] button, and complete the following information:
    Label
    Label to display in the form layout
    Display Type
    Lookup
    Object Name
    Choose the {object} selected in the first step
    Field Name
    Name of the field (Parent {object} is a common choice)
    Section
    Choose a section in the form layout (default selection can be used)
  3. Complete any other optional fields and click the [Save] button to save your changes
  4. Click the Forms tab and scroll to the Related Information Section
    • Click the Display Settings link in the Related Information Section heading bar
    • Move the object labeled: {object} based Hierarchy View to the Visible Objects area
  5. Click [Save]

Create a Self Reference Lookup between Records

  1. Navigate to the {object} tab (Company, for example)
  2. Edit a record, select a Parent Company from the lookup field and Save the record
  3. Select the record designated as Parent Company
  4. Scroll down to the Company based Hierarchy View section
Note that child Companies are displayed in the tree, demonstrating the relationships between records in the Company object

Edit an Object based Hierarchy View

To edit an <object> based Hierarchy View:

  1. Click Designer > Data > Objects
  2. Navigate to the object of interest
  3. In the Forms tab, navigate to the Related Information section
  4. Navigate to the <object> based Hierarchy View, click the Edit Related Information Editlayouticon.gif icon
  5. Fill in the information below.
  6. Click [Save]
    The <object> based Hierarchy View records are displayed in the Related Information section.
Object based Hierarchy View Information
Objectbasedhierarchyview.gif
Title
Title of the Related Information section
  • Pre-populated with <object> based Hierarchy View
  • Optionally, change the Title
Fields to Display
Select fields in the list of those Available, and click the right-arrow button to move them to the Selected column; Optionally, click the up- or down-arrow buttons to change the order in which the fields appear
Sort By
Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
Additional Sort By
Optionally, choose a second-level sort
  • Choose a field to determine the sort order of the records, and choose either Descending or Ascending order
Display Type
Choose from Tree or Tabular; Tree is default
Tree
 
Tabular
  • If Display Type is Tree, the Mode Type option is displayed
  • Mode Type - Collapsed or Expanded; Collapsed is default
Scrolling Window Size
Define the number of rows to display by selecting a Scrolling Window Size; Choose from:
  • No Scrolling, Show all Rows
  • 5 Records, Scroll Window
  • 10 Records, Scroll Window
  • 20 Records, Scroll Window
  • 30 Records, Scroll Window
  • 40 Records, Scroll Window
  • 50 Records, Scroll Window

Delete an Object based Hierarchy View

To Delete an Object based Hierarchy View, delete the field that is associated with this Related Information Section.

  1. Visit Designer > Objects > {object} > Fields
  2. Click the field name.
  3. Click [Delete].
    A confirmation dialog opens.
  4. Click [OK] to delete the field.

This is a permanent deletion, and cannot be restored.