+ Start a Discussion
ilewi121ilewi121 

Can't access FeedItem.Id via Process Builder on Salesforce1

When I make a chatter content post via desktop, Process Builder can access that post's FeedItem.Id field.
However, when I make the same post via mobile, Process Builder is unable to access the FeedItem.Id field.

Create flow in Process Builder:
  • Object: FeedItem
  • Logic: FeedItem.Type = ContentPost
  • Result: Post to user's wall in Chatter containing FeedItem.Id
Test On Desktop:
  • Use “file” publisher action on case feed to upload a document and comment.
  • Process makes post on user's wall with FeedItem.Id
Test On Mobile:
  • Use “file” publisher action on case to upload a document and comment.
  • Process does not make post on user's wall because it can't access FeedItem.Id.
Does anyone know what's happening here and how I can get consistent behavior between mobile and desktop?
ilewi121ilewi121
To those interested, Apex will fire the flow (Granted, this is less desirable than a process, but it works in all contexts).

The code is based on: http://andyinthecloud.com/2014/10/26/calling-flow-from-apex/
for(FeedItem f : FeedItems){
            if(f.HasContent == TRUE && f.Type == 'ContentPost'){
                
                // Call the Flow
                Map<String, Object> params = new Map<String, Object>();
                params.put('FeedItemId',f.Id);
                Flow.Interview.ForwardFeedItem fwdFlow = new Flow.Interview.ForwardFeedItem(params);
                fwdFlow.start();
                 
                // Obtain the results
                String returnValue = (String) fwdFlow.getVariableValue('isSuccess');
                System.debug('Flow returned ' + returnValue);
                
            }
        }