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
Kt YadavKt Yadav 

Advanced Apex Specialist Superbadge -Step 7

Hi , 
I am facing one issue related to "selectFamily" method, can any one tell the exact issue.
User-added image
Best Answer chosen by Kt Yadav
Kt YadavKt Yadav
Hi,
I resolved this issue,i found that my product list was not redering so i fixed it.Below is the snippet for the same.
String query = 'SELECT Name, Product2.Family, Product2.Name, Product2Id, UnitPrice, Product2.Quantity_Remaining__c'
                     + '  FROM PricebookEntry WHERE IsActive = TRUE';
        
        system.debug('@@@ selectedFamily->'+selectedFamily);
        
        if (selectedFamily != null && selectedFamily != Constants.SELECT_ONE) {
            query += ' AND Product2.Family = \'' + selectedFamily + '\'';
        }
        query += ' ORDER BY Name Limit 14';
        system.debug('@@@Query->'+query);
        
             standardSetController = new ApexPages.StandardSetController(Database.getQueryLocator(query));
            standardSetController.setPageSize(Constants.DEFAULT_ROWS); 
       

Happy Coding :)