+ Start a Discussion
Jon GulikerJon Guliker 

Refresh flow component in lightning Community

I was trying to find a way to get a screen flow on a record page to update when a record was edited. I copied the Apex code for a lightning component linked in this article: https://douglascayers.com/2017/07/17/keep-flows-and-data-in-sync-on-lightning-record-pages/.
The component refreshs a Visualforce page when it detects edits to the record. I then just had to embed my flow in a vf page.
This worked great, however, my original intent was to get this to work in a lightning community. My understanding is that Lightning Data Service doesn't work in communities. I'm not much of a developer (as mentioned, I copied the code and just made a few small edits), so I am not sure how this component would need to be adjusted to get it to work in the community. I could post the code here, but it is in a bundle. 
Here is the direct link: https://github.com/douglascayers/sfdc-reloadable-visualforce-lightning-component/tree/master/src/aura/VisualforceRecordCmp
Khan AnasKhan Anas (Salesforce Developers) 
Hi Jon,

Greetings to you!

You can use force:refreshView event. It reloads the view.
To refresh a view, run $A.get('e.force:refreshView').fire();, which reloads all data for the view. This event is handled by the app container. It's supported in Lightning Experience, Salesforce app, and Lightning communities.

Please refer to the below links which might help you further with the above requirement.




I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas