function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RajManiaRajMania 

Auto population of other field, based on selection of look-up fields

Hi,

    I have a visualforce page, in which two fields are present. One is 'Account Name' which is a look up on Account object, other field is a textbox named as Account number.

Is it possible on select of a particular account, automatically Account number also get populated to the input TextText.

 

Thanks,

Raj

srisomsrisom

Hi,

 

You could try putting a javascript event (onchange) on the  Account Name.  When that fires you could call an actionFunction action from the javascript you run.  The action will set the other value in your controller.  You could even use rerender to then refresh the other field.

 

If you want to do the population from javascript you could just get the id of the second field and set the value.

 

If you search 'actionFunction' in the dev guide there are some nice examples.

 

Hope this helps.

 

Paul

RAJU_DEEPRAJU_DEEP

Hello,

           I have a similar kind of requirement i want to populate one text field value in visualforce page by selecting another field(by clicking on enter key) in the same page.

 

Your requirement is almost similar, did you get any solution for this. If yes then please help me out.

 

 

Thanks & regards,

Raju Deep