The LookupComponent performs a lookup and display of reference fields in a pop-up dialog box. The component supports the following features:
You can use the LookupComponent within the PropertyComponent or as a standalone component. To embed the LookupComponent within the PropertyComponent, put the field name and lookup component options instance into lookupFields, an attribute of PropertyComponentOptions.
The LookupComponent is available in the Versions 5.100 and later of Zuora Quotes.
The LookupComponent consists of:
The LookupComponent has the following attribues.
|id||String||An identifier that allows the component to be referenced by other components in the page|
|isRequired||Boolean||This attribute is only used when the lookup component is custom rendering|
The configuration options of the lookup component. See the Component Options section below for option details.
|rendered||Boolean||Specifies whether the component is rendered on the page|
The LookupComponent can be configured by constructing an instance of the LookupComponentOptions. The LookupComponentOptions has the following properties.
|Id||String||Yes||The unique id of the lookup component.|
|isEditMode||Boolean||No||The filed is editable if set isEditMode to true. Otherwise, the field cannot be edited. Default is false.|
|isRequired||Boolean||No||A red bar will be displayed besides the field if isRequired is set to true. Default is false.|
|lookupComponentControllerName||String||Yes||The name of controller which should extend the LookupComponentController class|
|lookupController||LookupComponentController||No||The controller will be used to get options information of lookup component|
|objectName||String||Yes||The name of object which the lookup field belongs to.|
|recordTypeId||String||Yes||The record type id of the object|
|targetId||String||No||You can use this field to set the default value for the component, you must set both targetId and targetName (displayed on ui side) together.|
|targetName||String||No||You can use this field to set the default value for the component, you must set both targetId and targetName (displayed on ui side) together.|
1. Build a field set
2. The Apex controller
In your property component controller, put the field name and lookup component options instance into Map lookupFields.
If you are using the LookupComponent in a PropertyComponent, you don't need to do anything on the Apex page.
If you want to use the lookup component as a standalone component on your own page, include it on your page and set the options for it in your page controller as was done in Step 2.