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
Shiva SFDeveloperShiva SFDeveloper 

Custom button with visualforce page does not load immediately when clicked

Hello everyone,

We have a custom button on Account object that calls a visualforce page. The visualforce page has a page action that redirects the user to the standard New Opportunity page Edit screen with some prefilled fields. This has been working fine for the past few months. 

However, recently, we have observed that when we click the button, a blank screen appears with the URL as 
https://instance-name--c.cs71.visual.force.com/apex/CreateOpportunity?scontrolCaching=1&id=xxxxxxxxxxxxx
and only upon refreshing this page, it redirects to the New Opportunity page. This is adding an additional step for all the users many of whom are not actually aware that refreshing can redirect in the first place and it is causing some friction in the daily activities. 

This is happening only with Chrome browser. Has anyone seen a similar behavior or aware of a possible cause/fix?  

Another thing, when Chrome inspect/console is opened, it works fine. It does show a warining message that "HTTP-Based Public Key Pinning is deprecated. Chrome 69 and later will ignore HPKP response headers." ; not sure if it related at all to the re-direct issue.

Any help/inputs will be appreciated.
David KevinDavid Kevin
Is this happening only with Chrome browser. I think I also have seen a similar behavior or aware of a possible cause/fix.