I have installed a managed package in my personal salesforce org. On clicking of custom button , as per requirement it must redirect to visualforce page.Instead of redirecting to visualforce page, log in page appears. Both custom button and visualforce are part of managed package.

Please suggest what changes need to be done so that we can access the visualforce page on custom button click.

  • Can you check the URL used in button if you are able? I think it is pointing to some other instance org URL instead of yours. Dec 24, 2018 at 7:56
  • I just checked. this custom button is executing javascript code and this javascript code is opening the visualforce in new window. Code is like this : window.open('/apex/<namespace>__<VF page name>?id={!Account.Id}','_blank','height=550,width=1200,left='+x+',top='+y); The namespace used here is the namespace of org where we have developed the code. after packaging it I have installed this package in my another org for testing . In my test org i am facing the issue of viewing the login page. Dec 24, 2018 at 8:35

1 Answer 1


Clearly, the button is directing you to the visualforce page in the org you developed the page. You will want to remove the namespace in the part of your javascript code that follows /apex/ from your button to look something like: window.open('/apex/<VF page name>?id={!Account.Id}','_blank'.

Once you do that your issue should be resolved in your package. You'll need to uninstall the package from your personal org and reinstall after updating your package.

  • Hi, Currently the VF page named OFAC_Multi_Match_Account is part of managed package which has been installed in my test salesforce org. I tried to create another VF page named OFAC_Multi_Match_Account in my test org and i did it successfully. So as per your suggestion if remove the namespace in my javascript code, then how JS code will identity that which page they need to call as there are two VF pages having same name, one with namespace of managed packaged and other one was created in successfully. Dec 27, 2018 at 11:38
  • I haven't done any work with managed packages in a couple of years. I strongly suspect the solution to your issue is going to be handled along the lines of what you'll discover in the docs under Namespaces and JavaScript Remoting.
    – crmprogdev
    Dec 27, 2018 at 23:33

You must log in to answer this question.

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