• Girija Joshi 5
  • NEWBIE
  • 40 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hi all,

I have a VF page where I am getting basic information for a lead like, FirstPage (VF page) and I am inserting into the lead object. Now FirstPage is calling SecondPage and which is asking to enter some more info and now I want to informaiton from SecondPage to be insertred in the same lead of the FirstPage (I have leadid).

Could anyone please tell me how to do that? My code is below.

<apex:page controller="FirstController">
    <apex:sectionHeader title="signup form" />
    <apex:form >
        <apex:pageBlock title="Create a New formr">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Volunteer Information" columns="1">
                <apex:inputField id="firstName" value="{!Lead.FirstName}" required="true"/>
                <apex:inputField id="lastName" value="{!Lead.LastName}"/>                 
                <apex:inputField id="Company" value="{!Lead.Company}" required="true"/>     
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

--------------------------------------------------------------------- SecondPage ----------------

<apex:page controller="FirstController">
    <apex:sectionHeader title="signup form details" />
    <apex:form >   
        <apex:pageBlock >     
            <apex:pageBlockButtons >
                <apex:commandButton action="{!Mysave}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Contact Inforamtion" columns="1">
                <apex:inputField id="Street" value="{!Lead.Street}" style="width:200px" required="false"/>              
                <apex:inputField id="City" value="{!Lead.City}" required="false"/>
                <apex:inputField id="State" value="{!Lead.State}" required="false"/>
                <apex:inputField id="Country" value="{!Lead.Country}" required="false"/>
                <apex:inputField id="PostalCode" value="{!Lead.PostalCode}" required="false"/>
            </apex:pageBlockSection>              
        </apex:pageBlock>
    </apex:form>
</apex:page>


------------------------------------------------- Controller -------------------------------------------------------------------------------

public class VolunteerInformationController { 
      
    Lead lead;
    String leadId;
    
    public VolunteerInformationController () {
        leadId = ApexPages.currentPage().getParameters().get('leadId');
    }
           
    public VolunteerInformationController (ApexPages.StandardController controller) {
        leadId = ApexPages.currentPage().getParameters().get('leadId');
    }
    
    public Lead getLead() {
        if(lead == null) lead = new Lead();
        return lead;
    }


    public PageReference save() {
        // Add the lead to the database. 
        insert lead;
        // Send the user to the detail page for the new lead.
        //PageReference leadPage = new ApexPages.Thankyou
        PageReference leadPage = new PageReference('/apex/Volunteer_Initial_Signup2');
        leadPage.getParameters().put('leadId', lead.Id);
        leadPage.setRedirect(true);
        return leadPage;
    }
    
    public PageReference Mysave() {
        
       //not able to figureout how to insert rest of the information for that lead id
        PageReference pageRef = ApexPages.currentPage();        
        return pageRef;
    }

}
Hi all,

I have one visualforce page which takes information like Student name, Address, phone number etc. I want make that visual page public so that my students can view and enter the information without login in. 
How to make any visualforce page public so that anyone can view? Or convernt into HTML and put it on my website.

thanks
--girija
 
Hi all,
In first VF page I am getting basic Lead information and I want to pass that information to another VF page which will have detailed information about the Lead. Now after click on Save button I need to pass that record information and then add more info and save that Lead.

Here is my first VF page:
<apex:page controller="myLeadController">
    <apex:sectionHeader title="New Lead Page" />
    <apex:form >
        <apex:pageBlock title="Create a New Lead">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>        
            <apex:pageBlockSection title="Lead Information">
                <apex:inputField id="firstName" value="{!Lead.FirstName}"/>
                <apex:inputField id="lastName" value="{!Lead.LastName}"/>
                <apex:inputField id="companyName" value="{!Lead.Company}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

public class myLeadController {
    
    Lead lead;

    public Lead getLead() {
        if(lead == null) lead = new Lead();
        return lead;
    }
    
    public PageReference save() {
        // Add the lead to the database. 
        insert lead;
        // Send the user to the detail page for the new lead.
       // need to pass the record id to Thankyou Page
        PageReference leadPage = new ApexPages.Thankyou
        leadPage.setRedirect(true);
        return leadPage;
    }

}
Hi,

I am trying to implement where people can visit my site and upload there profile. Is there is any way to do this? I searched on google but couldn't find the good solution. Please help me in this.
Hi all,

I have a VF page where I am getting basic information for a lead like, FirstPage (VF page) and I am inserting into the lead object. Now FirstPage is calling SecondPage and which is asking to enter some more info and now I want to informaiton from SecondPage to be insertred in the same lead of the FirstPage (I have leadid).

Could anyone please tell me how to do that? My code is below.

<apex:page controller="FirstController">
    <apex:sectionHeader title="signup form" />
    <apex:form >
        <apex:pageBlock title="Create a New formr">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Volunteer Information" columns="1">
                <apex:inputField id="firstName" value="{!Lead.FirstName}" required="true"/>
                <apex:inputField id="lastName" value="{!Lead.LastName}"/>                 
                <apex:inputField id="Company" value="{!Lead.Company}" required="true"/>     
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

--------------------------------------------------------------------- SecondPage ----------------

<apex:page controller="FirstController">
    <apex:sectionHeader title="signup form details" />
    <apex:form >   
        <apex:pageBlock >     
            <apex:pageBlockButtons >
                <apex:commandButton action="{!Mysave}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Contact Inforamtion" columns="1">
                <apex:inputField id="Street" value="{!Lead.Street}" style="width:200px" required="false"/>              
                <apex:inputField id="City" value="{!Lead.City}" required="false"/>
                <apex:inputField id="State" value="{!Lead.State}" required="false"/>
                <apex:inputField id="Country" value="{!Lead.Country}" required="false"/>
                <apex:inputField id="PostalCode" value="{!Lead.PostalCode}" required="false"/>
            </apex:pageBlockSection>              
        </apex:pageBlock>
    </apex:form>
</apex:page>


------------------------------------------------- Controller -------------------------------------------------------------------------------

public class VolunteerInformationController { 
      
    Lead lead;
    String leadId;
    
    public VolunteerInformationController () {
        leadId = ApexPages.currentPage().getParameters().get('leadId');
    }
           
    public VolunteerInformationController (ApexPages.StandardController controller) {
        leadId = ApexPages.currentPage().getParameters().get('leadId');
    }
    
    public Lead getLead() {
        if(lead == null) lead = new Lead();
        return lead;
    }


    public PageReference save() {
        // Add the lead to the database. 
        insert lead;
        // Send the user to the detail page for the new lead.
        //PageReference leadPage = new ApexPages.Thankyou
        PageReference leadPage = new PageReference('/apex/Volunteer_Initial_Signup2');
        leadPage.getParameters().put('leadId', lead.Id);
        leadPage.setRedirect(true);
        return leadPage;
    }
    
    public PageReference Mysave() {
        
       //not able to figureout how to insert rest of the information for that lead id
        PageReference pageRef = ApexPages.currentPage();        
        return pageRef;
    }

}
Hi all,
In first VF page I am getting basic Lead information and I want to pass that information to another VF page which will have detailed information about the Lead. Now after click on Save button I need to pass that record information and then add more info and save that Lead.

Here is my first VF page:
<apex:page controller="myLeadController">
    <apex:sectionHeader title="New Lead Page" />
    <apex:form >
        <apex:pageBlock title="Create a New Lead">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
            </apex:pageBlockButtons>        
            <apex:pageBlockSection title="Lead Information">
                <apex:inputField id="firstName" value="{!Lead.FirstName}"/>
                <apex:inputField id="lastName" value="{!Lead.LastName}"/>
                <apex:inputField id="companyName" value="{!Lead.Company}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

public class myLeadController {
    
    Lead lead;

    public Lead getLead() {
        if(lead == null) lead = new Lead();
        return lead;
    }
    
    public PageReference save() {
        // Add the lead to the database. 
        insert lead;
        // Send the user to the detail page for the new lead.
       // need to pass the record id to Thankyou Page
        PageReference leadPage = new ApexPages.Thankyou
        leadPage.setRedirect(true);
        return leadPage;
    }

}