Closed jhorbulyk closed 5 years ago
This action is possible through the SOQL Query Action but there is an ask from customers for this functionality to be exposed in a way that does not require learning the SOQL language.
One way this functionality could work is that:
Questions:
name like '%foo%'
)?Acme
)Why limiting this action to a lookup based only on unique fields?
What would you expect to happen if this action matched more than one value? Emit both? Throw an exception? Either may be useful in some scenarios. Can you give me an example of such a scenario where one of the two behaviors would be useful?
Why limiting this action to do a lookup on the strong equality, how about substrings (e.g. name like '%foo%')?
If we assume that we are in a situation where we want to match exactly one record, how could we assure that we only produce one record? For situations where multiple records are matched, see the questions on the above point?
What if we need to lookup based on parent object values (e.g. Contact with that particular ID and belonging to Account with name Acme)
I don't know. Does salesforce allow you to create uniqueness constraints than span objects?
I send you guys an email regarding "Referencing Objects by IDs" in Salesforce
CDoD
Development:
QA:
New
Lookup
action should be created for the Salesforce component. This action should:Account
. Types in the dropdown should be dynamically fetched via Salesforce REST Metadata API,External ID (extID__c)
) (see example below on which fields should be presented to the user)string
inbound metadata that should be filled with the value using expression that would be compared with the value of the field above.Which fields should be used for lookup?
Salesforce have a flexible field structure here is the sample metadata description of the
Contact
object (has a parent relation toAccount
):Full JSON you can find here
Based on the information above list of fields available for lookup should include:
Lookup
externalId=true
unique=true
Please note that external ID fields are not necessarily unique:
So for
Contact
based on example above we should see following fields:How results should be handled
It is essential to agree on the proper result handling, for lookup action we may have multiple outcomes:
Lookup
action should emit a single message with empty body.Account
to theContact
- in this case a single message will be emitted, found object will be abody
of the messageSee more information about relationships between Salesforce objects here.