0

VF Page

<apex:page standardController="Lead" extensions="SourceMDMLeadPageController">
    <apex:form >
        <apex:sectionHeader subtitle="New Lead" title="Lead Edit"/>
        <apex:pageMessages escape="false"></apex:pageMessages>

        <apex:pageBlock title="Lead Edit" >
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!saverecord}"/>
                <apex:commandButton value="Cancel"/>
            </apex:pageBlockButtons>

            <apex:pageBlockSection title="Lead Information" columns="2" collapsible="false" >
                <apex:inputfield value="{!campmem.campaignID}"/>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Lead Owner"/>
                    <apex:outputText value="{!u}"/>
                </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Phone"/>
                <apex:inputField value="{!CurentLeadRec.Phone}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel >First Name</apex:outputLabel>
                <apex:outputLabel >
                <!--<apex:selectList size="1" value="{!selectedfirstName }">
                  <apex:selectOptions value="{!FirstNamelist}"/>
                </apex:selectList> -->
                <apex:inputField value="{!CurentLeadRec.Salutation}"/>
                <apex:inputField value="{!CurentLeadRec.FirstName}" />
                </apex:outputLabel>
            </apex:pageBlockSectionItem>


            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Mobile"/>
                <apex:inputField value="{!CurentLeadRec.MobilePhone}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Last Name"/>
                <apex:inputField value="{!CurentLeadRec.LastName}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Fax"/>
                <apex:inputField value="{!CurentLeadRec.Fax}"/> 
            </apex:pageBlockSectionItem>


            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Company"/>
              <apex:inputField value="{!CurentLeadRec.Company}"/> 
            </apex:pageBlockSectionItem>


            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Email"/>
              <apex:inputField value="{!CurentLeadRec.Email}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Title"/>
              <apex:inputField value="{!CurentLeadRec.Title}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Website"/>
              <apex:inputField value="{!CurentLeadRec.Website}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Lead Source"/>
              <apex:inputField value="{!CurentLeadRec.LeadSource}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Status"/>

            <apex:inputField value="{!CurentLeadRec.Status}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Status"/>
              <apex:inputField value="{!CurentLeadRec.Rating}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Status"/>
              <apex:inputField value="{!CurentLeadRec.Industry}"/> 
            </apex:pageBlockSectionItem>


            <apex:pageBlockSectionItem >
              <apex:outputLabel value="No. of Employees"/>

            <apex:inputField value="{!CurentLeadRec.NumberOfEmployees}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Annual Revenue"/>

            <apex:inputField value="{!CurentLeadRec.AnnualRevenue}"/> 
            </apex:pageBlockSectionItem>


            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Allow Duplicates"/>

            <apex:inputField value="{!CurentLeadRec.AllowDuplicates_Mdm__c}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Candidate Key"/>

            <apex:inputField value="{!CurentLeadRec.Candidate_Key__c}"/> 
            </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
                   <apex:pageBlockSection title="Adress Information" columns="1" collapsible="false" >
                   <apex:pageBlockSectionItem >
              <apex:outputLabel value="Street"/>

            <apex:inputField value="{!CurentLeadRec.Street}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="City"/>

            <apex:inputField value="{!CurentLeadRec.City}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="State/Province"/>

            <apex:inputField value="{!CurentLeadRec.State}"/> 
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Zip/Postal Code"/>

            <apex:inputField value="{!CurentLeadRec.PostalCode}"/> 
            </apex:pageBlockSectionItem>

            <apex:pageBlockSectionItem >
              <apex:outputLabel value="Country"/>

            <apex:inputField value="{!CurentLeadRec.Country}"/> 
            </apex:pageBlockSectionItem>
            </apex:pageBlockSection>

            <apex:pageBlockSection title="Additional Information" columns="2" collapsible="false" >         
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Description"/>
                    <apex:inputField value="{!CurentLeadRec.Description}"/> 
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Class

public SourceMDMLeadPageController(ApexPages.StandardController controller) {
   this.CurentLeadRec = (Lead)controller.getRecord();     
   system.debug('*** CurentLeadRec  *****'+CurentLeadRec  );
}

I am not able create lookup field of Campaign in this Page..need help.

  • How do you set value in campmem – Reshma Jan 11 '17 at 6:29
0

Have you define it in your extension?

public CampaignMember campmem {get;set;}

public SourceMDMLeadPageController(ApexPages.StandardController controller) {
   this.CurentLeadRec = (Lead)controller.getRecord();     
   system.debug('*** CurentLeadRec  *****'+CurentLeadRec  );
   campmem = new CampaignMember();

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.