You need to sign in to do that
Don't have an account?
ani123
ew lookup value to br copied in an textbox field
i have productlookup field in custom vf page,instead of selecting lookup field on type of the content in lookup ield need to save in a text box called new product ????????????
can anyone help me with this
you would still be using teh lookup to get the value I guess.
If so, you can just copy value from the lookup to your text field in teh apex code before saving. If you want the same on population , you can have a onchange action support with that ionput field , invoking a method that does so.
VF page :
<apex:inputField value="{!lookup}" >
<apex:actionSupport event="onchange" action="{!populateText}" rerender ="textBox" />
</apex:inputField>
<apex:inputText value="{!textvalue}" id="textBox" />
Controller
public pageReference populateText()
{
if(lookup != NULL)
textvalue = lookup;
return null;
}
Hope thsi helps.
No i use this logic i am getting error as INvalid Id"
I am not sure why you gettign the error , it might be becuase you are trying to populate a text filed to the id field. If that is so , please get the actual id for the name and then populate.
if nto so ,
try this :
if(lookup != NULL)
{
textValue= '';
textValue += lookup;
}
it would be easier for me to help if you could elaborate on exactly what you are trying to do.