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
kdmrkdmr 

Change Lookup fields to Picklist

Hi,

 

I have 2 custom objects Obj1 and Obj2, Obj2 has a lookup reference to Obj1. I am trying to make the lookup reference field show up as a Picklist so that users may select the value from the drop down option rather than the pop-up window for the lookup.

If the above request can be achieved using Visualforce pages, any pointers on doing the same would be helpful.

 

Thanks

KD

Ankit AroraAnkit Arora

Per my understanding you need to create a picklist of record values instead of looking them up. Yes you can do this by using SelectList on your custom visual force page. Get all records by Querying Obj1 in controller and add those record values in selectlist. Now you can show this selectlist on page.

 

Note : Please check what is the limit of showing values in picklist on visualforce page, I guess it is 1000 values only.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page