function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bertrand DBBertrand DB 

Refresh related list when creating a child record

Hello,
I have a simple Process Builder that is triggered when an opportunity is edited as closed-won: it will create a contract linked to the same account.
  1. The user is on the opportunity record, set it as "Closed Won".
  2. Then, he clicks on the Account Name and sees the related list.
  3. The contract created via Process Builder isn't there. We need either to manually refresh the page, or to click on the Contract related list to see it.
This isn't convenient on an end-user perspective.

Do you have any idea how to make this better?

I noted that if I do in the browser console a $A.get("e.force:refreshView").fire(); it correctly refresh the list and shows the contract.

Thanks in advance for your ideas!
SandhyaSandhya (Salesforce Developers) 
Bertrand DBBertrand DB
Hello,
The problem is that I have no place where I can put force:refreshView as I don't use a custom lightning component.

Litteraly, I just update my opportunity from the standard screens.Then I go to the account record page and I need to manually refresh this page to see the contract record created via process builder (triggered by the update of the Opportunity).

During all these processes, I don't use any Lightning Component.