0

I'm using the following method

public static PageReference redirectToOpportunity(String oppId) {
    PageReference pg = new PageReference('https://cs.salesforce.com/'+ oppId);
    pg.setRedirect(true);
    return pg;
}

to be able to redirect from my custom visualforce page to the standard Opportunity page. I would like to know how to be able to refresh the standard Opportunity page after my redirect method redirectToOpportunity() is executed?

1 Answer 1

0

You just need to pass the oppId to the Pagereference method to navigate to the Opportunity detail page.

public static PageReference redirectToOpportunity(String oppId) {
    PageReference pg = new PageReference('/'+ oppId);
    pg.setRedirect(true);
    return pg;
}
2
  • I did it but it still constantly showing in the inline of the Opportunity standard page that certain fields are editable but once the page is refresh manually the page show such fields as read only and NOT editable. Have you got any other suggestions because I desperately need to find a solution Nov 17, 2016 at 6:44
  • Can you post a screenshot?
    – human
    Nov 17, 2016 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .