Process Builder on Feed Item fails when making spanning reference to the parent object if the parent is a Custom Object
Last updated 2021-05-26 ·Reference W-5875410 ·Reported By 26 users
A Process Builder on Feed Item fails when it refers to the parent object, and the parent is a custom object.
When process criteria or action includes - for example - reference to "[FeedItem].Parent:My_Object__c.Id", then posting a feed item on a "My_Object" record causes the process to fail with message that "The flow failed to access the value for myVariable_current.Parent:My_Object__c.Id because it hasn't been set or assigned".
The same type of reference works when the parent is a standard object.
1) Create a custom object ("My Object"). Select "Allow Activities", and create a tab.
2) Setup | Feed Tracking, enable feed tracking for "My Object"
3) Create a Process ("Feed Item Process") as follows:
Object: Feed Item
Starts: when a record is created or edited
[FeedItem].ParentId is null Boolean false
Action: Create a record. Create a Task with these field values:
Assigned To ID :: Formula :: $User.Id
Priority :: Picklist :: Normal
Status :: Picklist :: Not Started
Subject :: String :: "Process Task"
Related To ID :: Field Reference (or Formula) :: [FeedItem].Parent:My_Object__c.Id
Activate the Process
4) Create a "My Object" record.
5) Post something to the Feed of the record created in #4.
Expected Result: Process creates a Task on the record
Actual Result: Process fails at the record create action because "myVariable_current.Parent:My_Object__c.Id hasn't been set or assigned"
A possible workaround is for the Process to call a Flow, and for that Flow to query the Feed Item's parent record and perform necessary actions based on the parent record data it retrieves. Please bear in mind that Salesforce does not provide Support for designing new Flows.
Reported By (26)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.