0

This issue is specific to Lightning Environment. I have a custom Button on Opportunity Object.This custom Button has a VF page behind it.The VF page consists of only opening & closing tags with an Action being called from controller.The action only updates Owner field. This custom button works well.On click of button it updates the owner field but it takes time to show the updated owner value on the lightning detail page.I need to manually hard refresh page 2 to 3 times.Can i get a way that to show the updated value on lightning detail page at the 1st glance?

Code :

<apex:page standardController="Account" extensions="AccountOwner" action="{!doUpdate}">
</apex:page>

//Class
public with sharing class AccountOwner {
    Account record;

    public AccountOwner(ApexPages.StandardController stdController) {
        record = (Account)stdController.getRecord();
    }

    public PageReference doUpdate() {
        record.ownerId = UserInfo.getUserId();
        update record;
        return (new ApexPages.StandardController(record)).view();
   }
}
3
  • I think there is a known issue regarding this. You can search on the known issues category on salesforce.
    – javanoob
    Nov 8, 2017 at 18:48
  • @javanoob i didn't get one.Can you pls forward me the link of that issue? Nov 8, 2017 at 22:06
  • 1
    Sorry, I was on mobile and could not post the link earlier. Here you go: success.salesforce.com/…
    – javanoob
    Nov 8, 2017 at 22:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.