+ Start a Discussion
Madhu007Madhu007 

can we edit or update the lookup field from the vf ppage?

can we edit or update the lookup field from the vf ppage? 

Thanks in advance...
EnreecoEnreeco
What do you exactly want to do?
Update the "input" component's HTML or change the field value (using apex:inputField component)?
Madhu007Madhu007
Hi Enreecco, For Example, I have custom lookup field in the vf page as Input field. From the lookup field i will select the value from the existing record. If i thought the value in the record was wrong. So In the Vf page after after selecting the value from the lookup i will edit the value in the input field. Then I want to update the select record with my changes in the input field. Is this posiible?
EnreecoEnreeco
If I understand, you want to check the value of the lookup field and reset it if "you don't like it's value".
You can do something like this:
  1. implement a apex:actionFunction that will post you form to a given apex method in which you can check the value of the lookup and reset it if you need
  2. use the "onchange" attribute of the apex:inputField you can call the actionFunction of the step 1, so every time you change the lookup value the apex controller is invoked