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
ShakespeareShakespeare 

Invoke/Launch a Visualforce Page as a Popup Through a Custom Link on Contracts Page

Hi Everybody,

 

I have created a new visualforce page that I want to invoke through a custom link on Contracts or Opportunity page. When I try to add this page as a link through Setup --> Customize --> Contracts --> Buttons & Links. On Custom Button or Link Edit page when I select Content Source dropdown as visualforce page, my newly created visualforce page is not displayed in the Content dropdown.

As per my understanding, my visualforce page the working correctly when accessed through its link should appear in the Content dropdown when when user selects Content Source as visualforce page.

 

Regards,

Shakespeare 

 

David VPDavid VP

Have you set the standardcontroller to Contract ?

Only then will your page appear in the drop down list.

 

D.

ShakespeareShakespeare

I believe this is a bit different case, I have my custom object named 'PixelRequestForm' that is a multiline edit page. A number of PixelRequests can be associated with a contract. For PixelRequestForm I have wrote my own controller. I now want provide a custom link on the contract page so that user can add multiple  pixel request against that contract through this multi-line edit popup.

In this case I have my own controller. Now how would I associate this pop up to the contract page?

 

David VPDavid VP

VF pages will not show up there if you don't associate them via the standardController to you custom object. You could still put all your logic in a controller extension instead of the controller you have now.

 

D.

XactiumBenXactiumBen

You might also be able to add a tabstyle to your visualforce page to avoid using a standard controller:

 

<apex:page controller="myCustomController" tabStyle="Contract"> ...

 

If this doesn't work (I'm not sure if this works in Custom Links or only works when overriding an object's standard buttons) you could also set the button type to be a URL then in your content use:

 

 

/apex/myPage?id={!Contract.Id}

 

This isn't the best way since when using a managed package it won't work - (Salesforce really needs a $Page global variable for custom links like they have with SControls).

ShakespeareShakespeare

David, Ben,

 

Thank you very much for your inputs. Can you please tell me how can I create a controller extension. Becuase when I mention statdardController and save the code. It does not diplay me the Controller link that appear in case of custom controller. I am unable to find a way to add my code of controller extension.

 

Thanks,