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
L0rdM0nkeyL0rdM0nkey 

Not listing Visualforce page

Doing some sandbox development. We are attempting to redirect a button to a new visualforce page and the page we have is not listed in the Override Properties. Here is our code for the VF page which works when manually triggered using this link https://cs14.salesforce.com/apex/newbuttonredirect

 

<apex:page standardController="Account" extensions="newbuttonredirect"

action="{!pageredir}">

</apex:page>

 

And then the Apex Class

 

public class newbuttonredirect

{

 

public newbuttonredirect(ApexPages.StandardController controller)

{

 

}

public Pagereference pageredir()

{

    Pagereference newpage = new Pagereference ('/500/e?cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSLUsername:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:&retURL=/500/');

    return newpage;

}

}

 

 

I understand this might not be the best route any suggestions

 

cmlcml

I believe your custom button is not related to account object. Your visualforce page 'Standard Controller' should refer to that object for which you have created custom button.

 

Suppose you have created cusotm button for 'TestObject__c' so your standard controller in Visulforce page should refer to 'TestObject__c'.

 

I hope this helps.

 

Chandra Mohan Lohani

 

Blog Site: http://cmlohani-force.blogspot.com