+ Start a Discussion
Nigel FNigel F 

custom button visualforce

I have a number of Acount page layouts driven by Record Types.

Since winter 16, the Custom buttons on these pages that fire VisualForce pages are failing with a "URL No Longer Exists" message. They were working fine before.

The Custom buttons with visualforce on single page layout objects work fine.

The common differentiator (where its failing) is that the URL for the Account is prefixed with MME.xxx.salesforce.com... This MME prefix is not present where the buttons work fine.


The visualforce code being invoked from the custom button is :

<apex:page standardController="Account"

 extensions="GeneratePromissoryNote"
 action="{!autoRun}"
>
  <apex:sectionHeader title="Auto-Running Apex Code"/>
  <apex:outputPanel >
    Error!
  </apex:outputPanel>
</apex:page>

Its probably very obvious, but can anybody point me int he right direction to resolve this ?

Thanks
Anirudh SinghAnirudh Singh
Hi Nigel,

Can you provide the code for the custom button too? If the URL is hardcoded, that might be the main problem. Please provide me two things: Custom button code and the URL of the page where the Error occurs. If you can provide the screen shots of the custom button page and the page on which the error is occuring that will be very good. I want to see the URLs of the pages.

Thanks and Regards,
Anirudh Singh
Nigel FNigel F
Hi Anirudh

The VisualForce code is : 

<apex:page standardController="Account"

 extensions="GeneratePromissoryNote" 
 action="{!autoRun}"

  <apex:sectionHeader title="Auto-Running Apex Code"/>
  <apex:outputPanel >
    Error!
  </apex:outputPanel> 
</apex:page>

The URL its trying to use to get therer is : 

https://mme.cs20.visual.force.com/apex/StartGeneratePromissoryNote?scontrolCaching=1&id=001m000000LctSI

The Button psge is : 

User-added image


Thanks