Locator fields

If the Locator Field check box is selected, it means that this field can be populated with the value of a field from another record and a reference and association (note, the reference and the association are two separate things) to that record are created from the record containing the locator field.

This establishes the value of this field at the time it was populated from the other record. However, should the value in the referenced field change and be saved, the value in the locator field is not updated to the new value of the referenced field.

For example, the triProduct business object has a locator field named triVendorCompanyLookupTX that is set to create a reference to an Organization and to display the Organization's hierarchy path. If a triProduct record's triVendorCompanyLookupTX field were populated with a vendor whose hierarchy path value was Organizations\External Companies\Renovations, the locator field's value would be Organizations\External Companies\Renovations. If, after populating the locator field, the vendor's Name field (which makes up the last part of the hierarchy path value) was changed to ZetaBank, the locator field's value in the triProduct record would not be changed to the new value and would still have the value Organizations\External Companies\Renovations. This is because a locator field receives a copy of the referenced record's field value and not a link to the value.

Locator fields are beneficial if a record containing a locator field needs to retain the original value of the referenced record as it was when the locator field was populated with the referenced record. If your situation calls for a live link to the referenced record's most up-to-date value, you may want to use a smart section. Smart sections are discussed in "Record organization".

At runtime, if an alternate form is defined for the locator and the user selects the control to open the locator, then the alternate form displays.

When the Locator Field check box is selected, you use the Locator Module field to specify which field of which business object populates the locator. Begin by selecting the name of the module the field's business object is defined in. Select that module name as the value for the Locator Module field.

After you select a module name as the value of the Locator Module property, you specify the business object and field to be associated with this field. You also specify the association to be used to connect the two business objects.
Business Object Name

The value of this property is the name of the business object that contains the field whose value populates this field. Choose the value of this field from a drop-down list of the business objects in the module that was specified for the value of the Locator Module property.

The drop-down list also contains the value All. The meaning of All is as follows.

Associated String

The value of this property is the name of an association that connects this field's business object to the business object whose name is the value of the Business Object Name property. The choices available in the drop-down list are the business object-level association definitions that have been created from the object that contains the locator field to the object that is specified in the Business Object Name property.

If the value of the Business Object Name property is All, the value of this property is the name of an association between this field's business object and the base business object of the module specified as the value of the Locator Module property. Such an association allows records created from this field's business object to be associated with records created from any business object in the module named by the Locator Module property.

Locator Field

This property's value is the name of the field that this field is populated from in the business object named by the Business Object Name property. The name is prefixed with the name of the section that contains the field. If the field is not in a smart section, the name General is used for the section name.

The drop-down list contains the names of fields in the business object named by the value of the Business Object Name property. If the value of the Business Object Name property is All, the drop-down list contains the names of fields in the base business object of the module specified as the Locator Module property's value.

After you finish specifying properties values for this form, click the form's Ok action. After you save the locator field properties, additional field properties named Locate Using and Locator String appear.
Locate Using

The Locate Using property has two hyperlinks. The text of the upper hyperlink contains the values specified for the Business Object Name and Locator Field locator field properties. Clicking the upper hyperlink causes the form used to specify these properties to reappear.

The lower hyperlink in the Locate Using property has the text Edit Mapping. Clicking this lower hyperlink causes a form to appear in the List panel in which you to specify that the value of other fields in this business object should be taken from the same record associated with this locator field.

If you click the search icon next to a field's name in the Locator Mapping form, a list pops up in which you specify which field of the record associated with this locator field is be used to set the value of the field in this business object whose icon you clicked.

Locator String

The Locator String property is read-only. Its value is the value you specified for the Associated String locator field property.

There is some similarity between smart sections and locator fields. For example, setting the value of a locator field is done in the same way as setting the value of a smart section, and this is different from setting other field types. The way that a workflow sets the value of a record's contents is called Object Mapping and is discussed in "Object mapping".

When a locator field is initially created or is cleared, the objectID of the referenced object is set to null.