Difference between revisions of "HowTo:Display Customer Data in an Order as a Read-Only Field"

From AgileApps Support Wiki
imported>Aeric
(Created page with "The following example describes how to display read-only fields from the Customer object in an Orders record. To do this, a Lookup Field is added to the Orders object, that is ba…")
Β 
imported>Aeric
Β 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The following example describes how to display read-only fields from the Customer object in an Orders record. To do this, a Lookup Field is added to the Orders object, that is based on Customers. Next, Customer fields are selected to be available for lookup. Finally, the Lookup-Derived Fields are placed in a Form in the Orders object.
<noinclude>
{{Orientation|Designers|Intermediate|10}}
</noinclude>This example shows how to display data from a Customer record as a read-only field in an Order. Β 


#To add a Customer-based Lookup Field to the Orders object:
===About the Process===
#*Click '''Designer > Data > Objects > Orders'''
In outline, a Lookup field that targets Customers is added to the Orders object. In the Lookup definition, Customer fields are then selected as "Additional Fields to Display" lookup. Finally, those fields are placed in a [[Form]] in the Orders object.
#*Click the Fields tab and add a Lookup Field (see instructions at [[Lookup#Create_a_Lookup_Field|Create a Lookup Field]]). Use the following parameters, and click the [Save] button to save your changes.
#:;Label:Customer
#:;Display Type:Lookup
#:;Object Name:Customer
#:;Field Name: The field for the lookup
#To select the Customer fields to be available for lookup:
#*Click the Fields tab to open the fields list
#*Select the ''Customer '' field
#:*In the Update Custom Field window, select the desired fields
#::[[Image:lookupderived.gif|none|thumb]]
#*Click '''[Save]'''
#To add Lookup-Derived Fields to the Section
#*From the [[Elements Sidebar]], click the ''Pick Existing'' tab to see the list of Customer fields available
#*Click and Drag the fields from the list into the desired section
#*Arrange the fields as desired
#*Click '''[Save]'''
#From the Customer object, add an order, which adds a new record to the ''Order information'' section
:In the Related Information section of the Customer Object, see the orders listed:
::[[Image:relatedcontact.gif|none|thumb|Order Information in the Customer Object]]
:Open an order to see the Lookup-Derived Fields
::[[Image:displaylookupfield.gif|none|thumb|Lookup-Derived Fields]]
<noinclude>
<noinclude>
''Learn more:'' [[Lookup-Derived Fields]]
''Learn More'' [[Lookup-Derived Fields]]
</noinclude>
</noinclude>
{{Note|For an alternative, consider doing a [[Lookup#Lookup-Based Auto-Copy of Field Data|Lookup-Based Auto-Copy of Field Data]]. That method makes a copy of the data in the current record. You can then edit the value without changing the original data. You might use that feature for the Customer's phone number, for example, to allow a temporary number to be used for today's order.
;Comparison of the two methods:
{{:Common:Comparison of Lookup-derived fields and Auto-copy fields}}
}}
===Add a Customer Lookup===
If one does not already exist, add a Customer Lookup to the Orders object:
#Visit '''[[File:GearIcon.png]] > Customization > Objects > Orders'''
#Click the Fields tab
#If a '''Related to Customer''' lookup field does not already exist, add it, using the following parameters:
#:* '''Label -''' Related to Customer
#:* '''Display Type -''' Lookup
#:* '''Object Name -''' Customers
===Specify the Lookup-derived Field (Additional Field to Display)===
While adding the field (or editing it, if it already exists), you can now specify the Lookup-derived field. The Customer Name already appears to identify the lookup record, so here you'll specify the company address:
# Go to the section ''Lookup Field Configuration'' and under that, to '''Additional Fields to Display'''
# Select '''Customer Address''' and move it from the ''Available Fields'' list to the list of ''Selected Fields''.
#: You have now specified Customer Address as a lookup-derived field in the Orders object. (Note that you could choose to copy data to a field, instead.)
#Click '''[Save]'''
:''Learn more:'' [[Lookup#Create_a_Lookup_Field|Create a Lookup Field]]
===Include the Field in the Record Display Form===
The last step is to include the read-only lookup-derived field in the Orders display form:
# Visit '''[[File:GearIcon.png]] > Customization > Objects > Orders'''
# Click the '''Forms''' tab
# In the '''Elements''' list, under the ''Fields'' tab, locate the field you created: '''Related to Customer Customer Address'''. (Mentally insert a comma when reading that label, so you see it as "Related to Customer, Customer Address".)
# Drag that field into the form, at the location where you want it to be displayed.
# Click '''[Save Changes]'''
# Click the pencil icon [[File:PencilIcon.png]] next to the field, to edit it.
# Change the label that appears in the form:
#: '''Display Label -''' Customer Address.
# Click '''[Save]'''
===Try it Out===
From a Customer record, add an order. (That's the easiest way to do it, because the Related to Customer Lookup field is filled in for you.)
# Click the '''Customers''' tab.
# In the ''Related Information'' section, where the ''Orders'' appear, click '''[New Record]'''
# Add the information needed to place the order.
# Click '''[Save]'''
#: A new record appears in the ''Orders'' section of the Customer record.
# Click the folder icon [[File:FolderIcon.png]] for the Order.
#: The Order record appears, with the Customer Address displayed.
# Click '''[Edit]'''. Note that the Customer Address field can't be edited.

Latest revision as of 19:11, 24 May 2013

For:   Designers
Level: Intermediate
Time: 10 minutes

See more:
    ◾ HowTo Guides

This example shows how to display data from a Customer record as a read-only field in an Order.

About the Process

In outline, a Lookup field that targets Customers is added to the Orders object. In the Lookup definition, Customer fields are then selected as "Additional Fields to Display" lookup. Finally, those fields are placed in a Form in the Orders object.

Learn More Lookup-Derived Fields

Notepad.png

Note: For an alternative, consider doing a Lookup-Based Auto-Copy of Field Data. That method makes a copy of the data in the current record. You can then edit the value without changing the original data. You might use that feature for the Customer's phone number, for example, to allow a temporary number to be used for today's order.

Comparison of the two methods
  • Lookup-derived fields are displayed when the user is selecting a target record. Auto-copy fields aren't.
  • Lookup-derived fields are not automatically included in record forms. You have to add them manually.
  • Lookup-derived fields are read-only. The contents of Auto-copy fields can be modified.}}

Add a Customer Lookup

If one does not already exist, add a Customer Lookup to the Orders object:

  1. Visit GearIcon.png > Customization > Objects > Orders
  2. Click the Fields tab
  3. If a Related to Customer lookup field does not already exist, add it, using the following parameters:
    • Label - Related to Customer
    • Display Type - Lookup
    • Object Name - Customers

Specify the Lookup-derived Field (Additional Field to Display)

While adding the field (or editing it, if it already exists), you can now specify the Lookup-derived field. The Customer Name already appears to identify the lookup record, so here you'll specify the company address:

  1. Go to the section Lookup Field Configuration and under that, to Additional Fields to Display
  2. Select Customer Address and move it from the Available Fields list to the list of Selected Fields.
    You have now specified Customer Address as a lookup-derived field in the Orders object. (Note that you could choose to copy data to a field, instead.)
  3. Click [Save]
Learn more: Create a Lookup Field

Include the Field in the Record Display Form

The last step is to include the read-only lookup-derived field in the Orders display form:

  1. Visit GearIcon.png > Customization > Objects > Orders
  2. Click the Forms tab
  3. In the Elements list, under the Fields tab, locate the field you created: Related to Customer Customer Address. (Mentally insert a comma when reading that label, so you see it as "Related to Customer, Customer Address".)
  4. Drag that field into the form, at the location where you want it to be displayed.
  5. Click [Save Changes]
  6. Click the pencil icon PencilIcon.png next to the field, to edit it.
  7. Change the label that appears in the form:
    Display Label - Customer Address.
  8. Click [Save]

Try it Out

From a Customer record, add an order. (That's the easiest way to do it, because the Related to Customer Lookup field is filled in for you.)

  1. Click the Customers tab.
  2. In the Related Information section, where the Orders appear, click [New Record]
  3. Add the information needed to place the order.
  4. Click [Save]
    A new record appears in the Orders section of the Customer record.
  5. Click the folder icon FolderIcon.png for the Order.
    The Order record appears, with the Customer Address displayed.
  6. Click [Edit]. Note that the Customer Address field can't be edited.