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
jeevitha annabathula 5jeevitha annabathula 5 

how to autopopulate a field value based on parent object(lookup) in visaul force page? example when i select item unit price has to autopopulate its value

 
  • User-added image
DMayank ParmarDMayank Parmar
Map that item name to the query part onclick of the search button  to controller so as from the Record it can fetch  the value.

lets say ,
    field countryname -- you entered INDIA        outputFeild=> capital=DELHI   so  onbutton click map this value in the query 
EX-  query = 'Select capital , FROM CountryCapitals__c WHERE CountryName__c='+ countryname;
jeevitha annabathula 5jeevitha annabathula 5
Hi I am new to salesforce coding may i know  how to Map that item name to the query part onclick of the search button  to controller so as from the Record it can fetch  the value. can you plaese provide me a sample code of vf page and controller please