Cross Object Field References in Flows
Now, I might be completely wrong here but I just CAN NOT get sObject Variables and Cross Object References in Flows working.Â
Documentation
- Release Notes - released in Summer '14
- Developer Docs
- Developer Docs
- Known Issue - not entirely related to this issue, but adding it here for reference anyway.Â
Posts
- Interesting Success Post that says put the Cross Object references in formulas.Â
- Cross Referencing Fields in Visual Flow - also noting the formulas trick.Â
Issues
- Issues with IF and CASE formulas referenced in Cross Object references.Â
- Cross Object Field Referencing in Visual Flow (also notes the same issue and to not use in assignments, and to be aware of the case and the __r syntax).Â
Scenario
I'm creating a new record. Then I want to create a Chatter post with details about that new record created.Â
The Flow error message states that the new record has been created, but the Chatter post fails because it can't read the new record.Â
I have created the new record, and I have a Text Template that tries to retrieve the Contact Name and the Product Name that was used to create this new record.Â
Â
Each one of these fails in the Flow with the message "The Flow failed to access the value for sobjContact.Name" for example.Â
This is from the Opportunity. The Opportunity must have a Contact and must have a Product for this flow to run - so the sobject Variables are NOT null, AND I can see the ID of the sobj of the Product in the flow, so it SHOULD be able to find the NAME!Â
So, I created each one of these variables into a formula and added that formula to the text template - NOPE, no luck!Â
I even tried the wasSet trick to ensure the Contact Name was set - NOTHING! It still errors.Â
Â
For one last try I made sure that I had set all the sObject variables to input and output. NOPE, still erroring.Â
I even tried to make the Opportunity the sObject because SURELY THE VALUES WILL BE THERE! NO!!!!!!!!!!!!!!!!!
I even added a formula field to the Opportunity for the Product Name and used that - NOPE.Â
Â
How the hell do I use this feature. I basically give up. Going back to doing another lookup on the Product to get the Product Name just to put is in the Chatter Post at the end.Â
Â
Â
Â
Â