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
RimaRima 

Custom links to visualforce page

Hi All,

I need to create a custom link from standard object to custom object which is developed with visualforce page.I would like to populate few feilds from standard object to the custom object. Could anyone please give me an example of how to acheive this using custom link? Your help is greatly appreciated.

 

 

*werewolf**werewolf*

Wait, are you saying that your custom object detail or edit page is in fact a Visualforce page?  If that's the case, then all you have to do is pass the merge field of the ID of the original object (say, {!Contact.Id}) into the querystring of the URL of the Visualforce page, and then have the controller behind your Visualforce page interpret that, do queries as needed, and populate the fields.

RimaRima

Hi,

 

Thank you for your response. Do I need to change code in the controller? It will be very helpful if you tell me what code should be added in the controller. Thank you for your help.

*werewolf**werewolf*

Well you'd definitely have to get the parameters from the query string to figure out the ID of the object you came from.  From there, there's not much I can tell you -- it's your controller and you have to make it do what you want.

RimaRima

Hi,

 

Thank you for the guidance. I will work on the controller and make it work.