You need to sign in to do that
Don't have an account?
bouscal
Set initial values for new lead apex page?
Have a process that requires creating both a Contact and a Lead, once the Contact page is saved the Lead page opens and don't want the user to have to type in the same info again. Below is what I have and I'm passing the entered values in the URL '...?FirstName={!Contact.FirstName}... etc'.
When this page renders is shows the values but outside the fields that I need them saved to. Suggestions?
apex:page standardController="Lead" sidebar="false" showHeader="false"> <apex:form > <apex:pageMessages /> <apex:pageBlock title="Sales Lead"> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{! save}"/> <input type="button" value="Cancel" class="btn" onclick="window.parent.closepop();"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Lead" collapsible="false" columns="1"> <apex:inputField value="{!Lead.company}" /> <apex:inputField value="{!Lead.firstname}">{!$CurrentPage.parameters.FirstName}</apex:inputField> <apex:inputField value="{!Lead.lastname}">{!$CurrentPage.parameters.LastName} </apex:inputField> <apex:inputField value="{!Lead.Product_Group__c}" required="True"/> <apex:inputField value="{!Lead.Phone}" /> <apex:inputField value="{!Lead.Email}" /> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
One way which i sees to achieve this
Actuely value we giveing inside
outside we are putting parameter value
So i think first we shoud set the value in controller and than should show on VF Page. Like
All Answers
One way which i sees to achieve this
Actuely value we giveing inside
outside we are putting parameter value
So i think first we shoud set the value in controller and than should show on VF Page. Like
Thank you Shiv, got me headed in the right direction. Had to adjust a couple lines in the apex page.