action.skip

How to create lookup relations to GIR sources?

← Billing & Invoice Management FAQ

gir_source_lookup With the ON_Invoice field properly set up (see Configuring Parent Object or Setting Up Single Object), JustOn creates lookup relations from the source records to the invoices. Your business may, however, also need lookup relations in the opposite direction – from the invoices to the original source records.

To this end, you create a (formula) ON field for the record ID on the source object and a (correspondingly named) target field on the invoice. Assuming you create invoices from orders, you create ON_OrderID on the Order object and the Invoice object.

This will insert the order ID to the ON_OrderID field on the order, and, on invoice creation, copy the ID value to the corresponding ON_OrderID field on the invoice – producing a lookup relation from the invoice to the original order.

  1. Navigate to the fields list of the source object ( Order).
  2. Create the following new field.

    API Name Data Type Description
    ON_<source>ID
    ON_OrderID
    Formula (Text) Specifies the source record ID, using the API name of the ID field Id.
  3. Navigate to the fields list of the Invoice object (ONB2__Invoice__c).

  4. Create the following new field.

    API Name Data Type Description
    ON_<source>ID
    ON_OrderID
    Lookup (<source>)
    Lookup (Order)
    Links to the related source record.

    For help about creating fields, see Managing Object Fields.