Difference between revisions of "Part 3: Add a Lookup field"
From AgileApps Support Wiki
Wikieditor (talk | contribs) (Created page with "In this part of the exercise, you create a field in the Orders Object to show the total price for all Line Items in an order. # Create an Index in the Line Items Object: ## Go...") |
Wikieditor (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Line Items'''. | ## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Line Items'''. | ||
## Select '''Indexes''' > '''New Index'''. | ## Select '''Indexes''' > '''New Index'''. | ||
## For the name, type '''OrderIndex'''. For the field, select '''Order'''. | ## For the name, type '''OrderIndex'''. For the field, select '''Order'''.<br><br>[[File:Objects_Line_Items_Indexes_ OrderIndex.png|800px]]<br><br> | ||
## Save the index. | ## Save the index. | ||
##: '''Note:''' The Index in the Line Items Object is required to create a Rollup Summary field in the related Order Object. | ##: '''Note:''' The Index in the Line Items Object is required to create a Rollup Summary field in the related Order Object. | ||
# Create a Lookup field inside the Orders Object named Line Items Lookup that points to the related Line Items Object: | # Create a Lookup field inside the Orders Object named Line Items Lookup that points to the related Line Items Object: | ||
## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Orders'''. | ## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Orders'''. | ||
## Select '''Fields''' > '''New Field'''. Fill-in the values as shown: | ## Select '''Fields''' > '''New Field'''. Fill-in the values as shown:<br><br>[[File:Objects_Orders_Fields_Line_Items_Lookup.png|800px]]<br><br> | ||
## Click '''Save'''. | ## Click '''Save'''. | ||
# Add a Rollup Summary field inside the Orders Object named Total Order Price to sum up the calculated Total Prices of all related Line Items for an order: | # Add a Rollup Summary field inside the Orders Object named Total Order Price to sum up the calculated Total Prices of all related Line Items for an order: | ||
## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Orders'''. | ## Go to the '''Configuration''' page, under the '''Customization''' tile, navigate to '''Objects''' > '''Orders'''. | ||
## Select '''Fields''' > '''New Field'''. Fill- | ## Select '''Fields''' > '''New Field'''. Fill-in the values as shown:<br><br>[[File:Objects_Orders_Fields_Total_Order _Price.png|600px]]<br><br> | ||
## Click '''Save'''. | ## Click '''Save'''. | ||
# Open the Orders Default Layout Form: | # Open the Orders Default Layout Form: | ||
## Note that the new Total Order Price field has been automatically added to Basic Information section. | ## Note that the new Total Order Price field has been automatically added to '''Basic Information''' section.<br><br>[[File:Form_Default_Layout_Remove_Line_Items.png|800px]]<br><br> | ||
## Remove the Line Items Lookup Lookup field from the Basic Information section. | ## Remove the Line Items Lookup Lookup field from the Basic Information section. | ||
## Save your changes. | ## Save your changes. | ||
# Open the Line Items Default Layout Form. Remove the Orders Lookup field from the Related Information section. | # Open the Line Items Default Layout Form. Remove the Orders Lookup field from the Related Information section.<br><br>[[File:Related_Information_Orders_Removal.png|800px]]<br><br> | ||
#:Save your changes. | #:Save your changes. | ||
# Test your modifications by adding a new order with three line items. Ensure the Total Order Price field gets filled. | # Test your modifications by adding a new order with three line items. Ensure the Total Order Price field gets filled. | ||
#:'''Note:''' As Rollup Summary fields are calculated asynchronously in the background, the value might not be filled immediately. | #:'''Note:''' As Rollup Summary fields are calculated asynchronously in the background, the value might not be filled immediately. | ||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |||
:{| border="0" align="left" cellpadding="5" cellspacing="1" | |||
| | |||
[[Part 2: Validating Data in a Form|Previous]] | |||
|} | |||
:{| border="0" align="right" cellpadding="5" cellspacing="1" | |||
| | |||
[[Part 4: Assign a Form to an Application Role|Next]] | |||
|} |
Latest revision as of 10:53, 14 December 2022
In this part of the exercise, you create a field in the Orders Object to show the total price for all Line Items in an order.
- Create an Index in the Line Items Object:
- Go to the Configuration page, under the Customization tile, navigate to Objects > Line Items.
- Select Indexes > New Index.
- For the name, type OrderIndex. For the field, select Order.
- Save the index.
- Note: The Index in the Line Items Object is required to create a Rollup Summary field in the related Order Object.
- Create a Lookup field inside the Orders Object named Line Items Lookup that points to the related Line Items Object:
- Add a Rollup Summary field inside the Orders Object named Total Order Price to sum up the calculated Total Prices of all related Line Items for an order:
- Open the Orders Default Layout Form:
- Open the Line Items Default Layout Form. Remove the Orders Lookup field from the Related Information section.
- Save your changes.
- Test your modifications by adding a new order with three line items. Ensure the Total Order Price field gets filled.
- Note: As Rollup Summary fields are calculated asynchronously in the background, the value might not be filled immediately.