Skip to main content
I'm working now in an special project, and I would like to use visual flow to build this app, so in one part of this project, there is a requirement of show a look up option, as drop down list, to bring a full list of items filtered by family, from Product Object

​Has somebody done this before?, Any Example???
5 respuestas
  1. 1 mar 2015, 11:38
    Hi Javier,

    To do that in visualforce page its and easy peasy thing.

    If you want the records of a particular object in the picklist then just do as follows

    1. In the controller query the records (Must having a limit )and add it to a SelectOption list.

    2. Show that SelectOption list on VF PAGE.

    Somthing like this 

    //Select list of Product

    List<SelectOption> productList = new List<SelectOption>();

    productList.add('--None--', '');

    //Query Product records and add to selectOption list

    for(Product2 pr : [Select Id, Name From Product2 Limit 10]) {

           productList.add( pr.Name, pr.Id);

    }

    Note : This code is not tested just written for an example

    Regards,

    Abhi Tripathi

    Salesforce Developer

    http://abhithetechknight.blogspot.in/
0/9000