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
ManidipaManidipa 

Populating values to a standard new/edit page from a visualforce page

Hi All,


I am having a requirement where I need to get the input field values from a visualforce page to a standard new/edit page on click of a button.I have created a visualforce page with a button,and on that button click I am redirecting it to new object page.But I am not able to get the input fields from the visualforce page to the create new record page.Can you please help on this.

 

 

On click of the button New Donor it should redirect to the new Donor Creation page and the Donor Name and Email values should be auto populated.Please find the code below.


<apex:page standardController="Donor_Aarthi__c" extensions="DonorSearchAarthiController" sidebar="false">

      <apex:pageMessages /> <!-- Used to display all error messages -->
 
      <apex:pageBlockSection id="section" >
      
        <!--Input fields for name and email -->
        <apex:pageBlockSectionItem id="item1" >
          <apex:outputLabel for="searchText">Donor Name</apex:outputLabel>
          <apex:panelGroup >
          <apex:inputText id="searchText" value="{!searchText}"/>
          <br /> <br />
          </apex:panelGroup>
        </apex:pageBlockSectionItem><br />
        
        <apex:pageBlockSectionItem id="item2" >
          <apex:outputLabel for="searchText1">Email</apex:outputLabel>
          <apex:panelGroup id="panel" >
          <apex:inputText id="searchText1" value="{!searchText1}"/>
          <br /> <br />
          <br /> <br />
           
          <!--Command buttons for search and reset -->
          <apex:commandButton value="Search"  id="searchbtn" action="{!search}" rerender="block" status="status"/>
          <apex:commandButton value="Reset" action="{!reset}" rerender="block" status="status"/>
          <apex:commandButton value="New Donor" onclick="window.open('/a0U/e?retURL=%2Fa0U%2Fo');" rerender="block" status="status"/>

 

PrakashbPrakashb

Yes you can pass the values entered in the page to the URL.

 

Please refer the below link.

 

http://boards.developerforce.com/t5/Apex-Code-Development/how-to-set-default-value-for-required-Field/td-p/502487