I have two objects - Project and Resource . Project is a lookup field on Resource. So in Project there is a related list called Resources.
Now in Resource , I have created a list button "Add project Resource" which calls a VF page(having custom controller). There is a commandbutton on the VF page like this
<apex:commandButton value="Save" action="{!save}"/>
and in controller
public PageReference save()
{
//....do some calculation
//...insert a new resource....
return new Pagereference('/'+project.id);
}
So basically it creates a new resource and navigates back to its parent project . Problem this when I am Switching to lightning experience , it does navigate to the project record but its resource related list is not updated. I need to refresh the project record manually and then it shows the newly added resource in the resource related list.
Is there some cache problem ?
I have tried using sforce.one.navigateToSObject("{!project.id}")
when its lightning but same problem occurs.
Please help.