You need to sign in to do that
Don't have an account?
Mubashir
How to input lookup field in VF form
Referring to Developer Trail - Beginner: Inputting Data Using Forms, is it possible to have an lookup input field with the search icon giving ability to choose one from the list of existing records instead of creating a new one. e.g. <apex:inputField value="{! Contact.Account.Name}"/> renders the label and blank space for Account field for this Contact.
thanks
thanks
Please see the sample code below
Every LookUp field store Id of the related object's record and its string type.
Thatswhy we use "accountid".
So,use this <apex:inputfield value="{!opportunity.accountid}"/>.
If we want to access any lookup field in visualforce page,use id with field as mentioned above.
Please see the link below
https://developer.salesforce.com/forums/?id=906F0000000Af5WIAS
Best Regards
Naga Kiran
All Answers
Please see the sample code below
Every LookUp field store Id of the related object's record and its string type.
Thatswhy we use "accountid".
So,use this <apex:inputfield value="{!opportunity.accountid}"/>.
If we want to access any lookup field in visualforce page,use id with field as mentioned above.
Please see the link below
https://developer.salesforce.com/forums/?id=906F0000000Af5WIAS
Best Regards
Naga Kiran
<apex:InputField value="{!contact.accountid}" />
Thx
thank you all.