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
Stephen FinlayStephen Finlay 

URL hacking not working with Visualforce page

I had previously been using the URL hacking technique to pre-populate the Contact field on a custom object from a custom button with the following URL: /a0L/e?CF00N90000007GAup={!Contact.Name}&CF00N90000007GAup_lkid={!Contact.Id}&retURL=/{!Contact.Id}
This works fine on the page built as a page layout.
I have then created the page as a Visualforce page and have triede the same technique to populate the contact field using a new URL ( as the contact fields Id is now different.
The new URL is /apex/StartCallCounsellor?j_id0:j_id2:j_id3:j_id19:j_id20={!Contact.Name}&j_id0:j_id2:j_id3:j_id19:j_id20_lkid={!Contact.Id}&retURL=/{!Contact.Id}
This does not work at all. The Contact field remains blank.
Seems that Visualforce pages do not support the URL hacking technique???
 
KaranrajKaranraj
You can able to pass parameter and display in a visualforce page by any of the following methods.
You can able to get the parameter value in the controller and assign that value to the inputText field value
ApexPages.currentPage().getParameters().get('paramName');
or you can also get the parameter value without apexcontroller and display in the visualforce page
<apex:outputText value="{!$CurrentPage.Parameters.paramValue}"/>