JOIN_OBJECT_CONNECTION

Description

Returns records from a specified object through a named connection or a related connection, filtered by joining field-value pairs, with an optional additional filtering clause.

Syntax

JOIN_OBJECT_CONNECTION(connection_name, object_name, ...[joining_field_name, joining_field_value], additional_clause_optional)

Parameters

ParameterData TypeRequiredDescription
connection_nameStringYesThe name of the connection used to retrieve records, which can be either a named connection or a related connection.
object_nameStringYesThe name of the object from which records are retrieved.
… joining_field_nameStringNoThe field name to match for filtering records. Multiple pairs allowed. Left Join if any pairs are included; Cross Join if all are omitted.
… joining_field_valueObjectNoThe field value used as a filter criterion.
additional_clause_optionalStringNoAn additional query clause for more specific filtering.

Examples

JOIN_OBJECT_CONNECTION(
            "Current", 
            "Opportunity",
            "AccountId", Id, 
            "IsClosed = true"
)
-- Fetches Opportunities from the "Current" connection where AccountId equals the current record’s Id, further filtered to IsClosed = true
JOIN_OBJECT_CONNECTION(
            "$Source", 
            "Opportunity",
            "AccountId", Id, 
            "IsClosed = true"
)
-- Fetches Opportunities from the $Source connection where AccountId equals the current record’s Id, further filtered to IsClosed = true
JOIN_OBJECT_CONNECTION(
            "$Target", 
            "Opportunity", 
            "AccountId", Id, 
            "OwnerId", OwnerId, 
            "FiscalYear = 2024"
)
-- Fetches Opportunities from the $Target connection where AccountId and OwnerId equals the current record’s Id and OwnerId, further filtered to FiscalYear = 2024.

Tips

  • Defines this function during the Scoping stage to retrieve and prepare data for subsequent use in the Mapping stage.

  • Be careful to provide joining pairs when using this function. Omitting joining criteria can result in cross joins, creating excessively large record sets. Follow Salesforce best practices to prevent exceeding system limits.

Related Formula