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
Sharmeela ManivannanSharmeela Manivannan 

Advanced Apex Specialist Superbadge - Step 3 Issue

I am hit with other issue 'Ensure that page performance is improved by only rerendering the table and error messages when a use clicks the Add button.' I have used actionRegion to rerender the needed table,chart and messages.still it shows issues.
Best Answer chosen by Sharmeela Manivannan
Zachery EngmanZachery Engman
You have to be sure the Add button is only re-rendering the two items, messages and table:  reRender="pageMessages,orderItemTable"  and that the Save button is only reRendering the chart:  reRender="inventoryChart"  (assuming that is the id you gave it)

All Answers

Zachery EngmanZachery Engman
You have to be sure the Add button is only re-rendering the two items, messages and table:  reRender="pageMessages,orderItemTable"  and that the Save button is only reRendering the chart:  reRender="inventoryChart"  (assuming that is the id you gave it)
This was selected as the best answer
Sharmeela ManivannanSharmeela Manivannan
Thanks a Lot @Zachery! I was adding all three in both buttons.
Raj Kakarla 19Raj Kakarla 19
I''m struck on Step 2

User-added image
Challenge Not yet complete... here's what's wrong:
Ensure that you loop through a query that aggregates the OrderItems related to the Products in the ProductMap keyset.

My relavent code is
//ToDo: Loop through a query that aggregates the OrderItems related to the Products in the ProductMap keyset
         for ( OrderItem oi : [
                    SELECT Id, Product2Id, PriceBookEntry.Product2.Quantity_Ordered__c, Quantity
                    FROM OrderItem
                    WHERE Product2Id = :ProductMap.keyset()
                ]){
                Product2 p =  ProductMap.get( oi.PriceBookEntry.Product2Id );
                p.Quantity_Ordered__c += oi.Quantity;
                ProductMap.put(p.Id, p);

            
        }
Can some one explain what does this mean?

Thank you
 
ravi reddy 68ravi reddy 68
Hi Raj Kakarla,

Visit this url  https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005O51 and check  Amit Singh's  post.
Maanas DesaiMaanas Desai
Hi ,
 
I have completed the Multiple choice questions for Platform Developer 2 as well as the 4 super badges. How do i link Webaccessor account to Trailhead? Has anyone got any email from salesforce after they completed the 4 super badges?

User-added image
Rajneesh Kumar 10Rajneesh Kumar 10
Hello All
I''m struck on Step 2

Challenge Not yet complete... here's what's wrong:
Ensure that the methods in the chartHelper class run as the system.

here is the chartHelper class.
public with sharing class ChartHelper {

    @AuraEnabled
    public static List<chartData> GetInventory(){
        List<chartData> cht = new List<chartData>();
        //ToDo: Perform a calculation that aggregates active Products that have a positive Quantity_Remaining__c
        //  And return a list of chartData
        //  Where the name is the Product Family and the Qty is the sum of the Quantity_Remaining__c
         
         AggregateResult[] groupedResults = [SELECT Family, SUM(Quantity_Remaining__c) FROM Product2 
                                              WHERE Quantity_Remaining__c > 0 AND IsActive = true
                                              GROUP BY Family];
        for (AggregateResult ar : groupedResults)  {
            cht.add(new ChartData(String.ValueOf(ar.get('Family')), Integer.ValueOf(ar.get('expr0'))));
        }
         /**for (AggregateResult ar : [SELECT Family, SUM(Quantity_Remaining__c) FROM Product2 
                                    WHERE Quantity_Remaining__c>0
                                        AND IsActive = true
                                             GROUP BY Family])  {
            cht.add(new ChartData(String.ValueOf(ar.get('Family')), Integer.ValueOf(ar.get('expr0'))));
        }**/
        
        
        return cht;
    }

    public class ChartData {
        public String name {get;set;}
        public Decimal val {get;set;}

        public ChartData(String name, Decimal val){
            this.name = name;
            this.val = val;
        }
    }

}

Any help highly appreciated
Maanas DesaiMaanas Desai
Make the calling class of charhelper in without sharing mode
Rajneesh Kumar 10Rajneesh Kumar 10
My Bad!! Thanks to pointing root cause.. 
Jhon Cortes 7Jhon Cortes 7
Hi @Maanas Desai cognizant, I`m in the same situation, I have completed the Multiple choice questions for Platform Developer 2 as well as the 4 super badges. What i Have done is send a case to salesforce team on this link http://certification.salesforce.com/open-a-case. I understand they will sendus an email in One week to link trailhead with webassessor according this article http://certification.force.com/pkb/articles/Public_KB/Changes-to-Platform-Developer-II. Let me know how is going your case. Regards 
Rajneesh Kumar 10Rajneesh Kumar 10
Anyone got email from salesforce to link webassessor and trailhead account??

Regards,
Rajneesh
Rajneesh Kumar 10Rajneesh Kumar 10
Hi Maanas desia, did you get any email from salesforce after completing super badges and MCQ??
Shivraj Gangabyraiah 19Shivraj Gangabyraiah 19
@Maanas Desai cognizant

i finished the advanced apex speciaslit badge. As per the update from salesforce we need to wait for a week to receive an email from salesforce to link our account with webassesor. Will this come up automatically or do we need to raise a case with salesforce to let them know we have finished this badge.

Also is there anything else from our end to be completed to get the PD2 cetification.

After how many days did you receive the mail for the certification and have you received the certificate 

 
Ajay ManoharAjay Manohar

@Rajneesh Kumar 10, @Shivraj Gangabyraiah 19

Did you receive the certification email for PDII, if yes, How many days after linking the webassessor with trailhead you receive the certification email? I linked the accounts on Jan 3rd, and didn't receive the certification email yet. Do we need to rise a case to get the final certification?
Scott Morrison 33Scott Morrison 33
Thank you all, that step was not very clear. The rerendering description could use some work. I don't know how get the rerender requirement from this "When a manager clicks Add, the chart should re-render performantly." And the error message "Make sure the table only renders after add is clicked" is very missleading. 
Manjunath S 85Manjunath S 85

I have an issue with this step where I'm constantly getting this error:

"Ensure that the getFamilyOptions method returns the correct picklist values."

Even though I am returning all the picklist values from Family field.

Log line:

(61716098)|USER_DEBUG|[78]|DEBUG|>>>>> familySelections >>>>>>>> (System.SelectOption[value="Select one", label="Select one", disabled="false"], System.SelectOption[value="Beverage", label="Beverage", disabled="false"], System.SelectOption[value="Dessert", label="Dessert", disabled="false"], System.SelectOption[value="Entree", label="Entree", disabled="false"], System.SelectOption[value="Side", label="Side", disabled="false"])
Can somebody help in understanding what the expected value here is?
Manjunath S 85Manjunath S 85

Adding to the reply above, the method to get the picklist values:

 

public static List<SelectOption> GetFamilyOptions(){
        List<SelectOption> familySelections = new List<SelectOption>();
        familySelections.add(new SelectOption(Constants.SELECT_ONE,Constants.SELECT_ONE, true));
        for(Schema.PicklistEntry ple : Constants.PRODUCT_FAMILY){
            familySelections.add(new SelectOption(ple.getLabel(),ple.getValue()));
        }
        system.debug('>>>>> familySelections >>>>>>>> '+familySelections);
        return familySelections;
    }