I created a custom object called ImportBusiness__c. I added this to the standard Account page, so now, when you look at an Account, you also see any related ImportBusiness__c objects. I followed the advice here:


This worked great, but now, when you click on a ImportBusiness__c link, I go to a ImportBusiness__c page using the standard layout, the default. I actually want to go to a custom VisualForce page. Is there any way I can alter what the default link goes to?

[ [ UPDATE ] ]

With this Visualforce page tag:

<apex:page standardController="ImportBusiness__c"     extensions="ImportBusinessController" id="ImportBusinessView">

I get this error:

Unknown constructor     'ImportBusinessController.ImportBusinessController(ApexPages.StandardController controller)'

There are multiple ways to do so depending on your end goal

  1. You can create a link field on the custom object that links to your Visualforce page and add this field to the account page layout related list. Reference
  2. If you always want the view record of the ImportBusiness__c to be a Visualforce page, you can override the view page. Reference
  3. If your visualforce page is generic and not related to specific record of the Import business record you can just add a related list button.
| improve this answer | |
  • It sounds like I want option #2, but your link doesn't say how to override the default page that I go to. – LRK9 Oct 25 '16 at 19:07
  • 1
    This is a bit more onpoint: developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/… – LRK9 Oct 25 '16 at 19:10
  • Let me know if you need further help on this. – Amr Ibrahim Oct 25 '16 at 19:13
  • Actually, I can't do this step: "For Override With select Visualforce Page." – LRK9 Oct 25 '16 at 19:14
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. – Matt Lacey Oct 25 '16 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.