Business Action: Add Reference

This operation can create a reference / link to an object with a specific target and a type. This allows you to add an entry on the References tab of the editor for the selected object.

For example, a business action can be used to reference the object to another object automatically, based on specified type and target. Additionally, it can automatically link the products to particular classification on import by adding an Add Reference business action to Import Manager.

This operation can also be run via a Bulk Update and sample data is provided in the References and Links: Add Reference or Add Referenced By Operations topic in the Bulk Updates documentation here.

Prerequisites

Before using this operation:

  1. Ensure a valid reference type with the necessary target object exists, and that the target object is valid for the source object. For more information, refer to the Reference and Link Types topic in the System Setup documentation here.
  2. Note that attempting to add a target that already exists on the object causes the action to fail with the message 'Reference already exists :< reference type>'
  3. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic here.

Configuration

  1. On the Edit Operation dialog, from the dropdown select the References and Links group and then select the Add Reference option.
  1. In the Type parameter, click the ellipsis button () to display the Select Reference Type dialog, select a reference type, and click the Select button.
  2. In the Target parameter, use one of these methods to select the relevant target. The target must be in accordance with the selected type, otherwise an error is displayed.

Note: The selected object dictates the label on the manual button. If the selected object requires a text value, the label is 'abc.' If the selected object is numeric, '123' is displayed, and so on for each validation base type.

  • For manual selection, click the 'abc' button (), click the ellipsis button () to display the Select Reference Target dialog, select a valid target, and click the Select button.
  • For function selection, click the 'fx' button (), click the ellipsis button () to display the Function Editor dialog. Add a function and evaluate, then click OK. For more information, refer to the Using Function Editor topic in the Resource Materials online help here.

Note: A function that cannot return the specific Target Type ID returns the 'Could not get the reference target.' error.

  1. Click the Save button to add the operation to the business rule editor.