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
SSimionSSimion 

Opportunity Product Selector - Lightning

Hi,

I am trying to create a Visualforce Page to replace the Add Products pop up window.

I want the users to be able to select the Product Family from a drop-down list and based on the Product Family, when they search for products - only active products that belong to that Product Family to come up. The Product Family is a picklist field on the Product object.

I have started working on the picklist visualforce and Apex code, but I am not sure if I got any close as I don't have experience with Apex classes and Visualforce Pages.

Could you please help?

Please see below what I have tried so far:

VF:

<apex:page controller="ProductFamilly">
    <apex:form >
        <apex:pageBlock>
          <apex:pageBlockSection title="Select Product Type">
      </apex:pageBlockSection>  
         <apex:pageBlockSection title="ProductType">
             <apex:pageBlockTable value="{!Family}">
                 <apex:column value="{!family.values}"/>
             </apex:pageBlockTable>
             <!--apex:pageBlockButtons-->
                 <apex:commandButton value="FIND" action="{!pf}"/>
             <!--/apex:pageBlockButtons-->
         </apex:pageBlockSection>   
     </apex:pageBlock>       
    </apex:form>
</apex:page>


Apex Class:

public List<ProductFamily> ProductValues{get; set;}
Public Dynamicfiltercon(){
        ProductValues=<ProductFamily>([SELECT values, FROM ProductFamily]);
    }

I am still looking into the search functionality code.


Thanks.