Salesforce Pack Documentation
Share
Explore
Formulas

icon picker
Lookup Formulas

Formulas that lookup to a specific ObjectType in Salesforce
Lookup formula details
3
1
LookupOpportunities()
Open
Lookup one or more Opportunity records in Salesforce.
2
LookupAccounts()
Open
Lookup one or more Account records in Salesforce.
3
LookupCampaigns()
Open
Lookup one or more Campaign records in Salesforce.
4
LookupContacts()
Open
Lookup one or more Contact records in Salesforce.
5
LookupLeads()
Open
Lookup one or more Lead records in Salesforce.
6
LookupCases()
Open
Lookup one or more Case records in Salesforce.
7
LookupTasks()
Open
Lookup one or more Task records in Salesforce.
No results from filter

Parameters

Required
account : The Salesforce account used to pull in this data.
Optional
filter : Filter results using the Salesforce native SOQL WHERE clause.
sort : Sort results using the Salesforce native SOQL ORDER BY clause.
limit : Limit the result count.
offset : Offset the result count.
fields : The list of fields to fetch on the retrieved records. By default, this formula fetches as many fields as possible up to Salesforce’s limit.

Examples

Salesforce::LookupContacts( [account], filter: Concatenate("My_Custom_Field__c = '",[Column],"'") ).First()
My_Custom_Field__c is the field name of which we want to search all contacts
[Column] is a column that holds user ids and because it’s a value we are searching for, it needs to be wrapped in single quotes.

Retrieve a Salesforce contact from their User ID

LookupContacts from User ID
Salesforce::LookupContacts( [account], filter: Concatenate("My_Custom_Field__c = '",thisRow.[Column],"'") ).First()
Returns the Contact with the matching user id and makes it a singular value using the First() formula allowing for the use of dot notation for all non-custom fields afterwards.

Retrieve an array of 5 Salesforce contacts from a partial name

Array of Salesforce contacts
Salesforce::LookupContacts( [account], Concatenate("Name LIKE '",thisRow.[Partial name search],"%","'"), limit: 5 )
We use the limit parameter to limit the returned results to 5
The % symbol is a wildcard value making the statement any name that starts with the Partial name search column value

Return a core field value or a custom field value from a Salesforce contact

Custom Single Field Value (PQL)
[Salesforce contact].Custom.Filter( CurrentValue.Name="PQL Score" ).First().Value
The Contact name, or any other standard field value, can be reached with simple dot notation

Use a control to return a custom field value

Custom Field Chooser Result
WithName( [Salesforce contact].Custom.Filter( CurrentValue.Name=[Choose Custom Field] ).First(), CustomFieldValue, Concatenate( CustomFieldValue.Name, ": ", CustomFieldValue.Value ) )

Return all custom field chips or a bulleted list of all custom fields and values

All Custom Fields as Bulleted List
[Salesforce contact].Custom.ForEach( Concatenate( CurrentValue.Name, ": ", CurrentValue.Value ) ).BulletedList()



Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.