+ Start a Discussion
Jeremiah CochranJeremiah Cochran 
I have built the reports and dashboards as outlined in the requirements, but I'm getting the following error "Challenge Not yet complete... here's what's wrong: Couldn't find a component with the title 'My Top Accounts'."  
User-added image

However, I have the component on the dashboard as you can see below.
User-added image
What am I missing?
Best Answer chosen by Jeremiah Cochran
Shukla YogeshShukla Yogesh
Hi Jeremiah,

Although this should not result into this error but check if 'folder' and 'view dashboard as- dashboard viewer' is correctly set. Also try cloning if you get error and delete original and rename back to Rep Scoreboard. 

Shivam Gupta 9Shivam Gupta 9 

i am getting below error while completing "Lightning Experience Rollout Specialist Superbadge Step #8"
Challenge Not yet complete... here's what's wrong:
Knowledge must be enabled for the org.
.User-added image

i have alredy enabled knowledge settings..

User-added image

Thank you.
Best Answer chosen by Shivam Gupta 9
Sitarama MurthySitarama Murthy
Hi All,

While trying this badge even i faced same issue.
workaround is please craete the new trailhead playground org and try enabling Knowledge and complete the requirement and try checking the challenge.

by doing this i have completed the Lightning Experience Rollout Specialist Superbadge.

Hope this please.




Where do I find all the supported locales of salesforce  and associated date and currency formats?

below link provides the list of locale, how do I get the date and currency format associated to particular locale?




http://www.interactiveties.com/b_locale_datetime.php provides the date format, but not for all locale.





Prashant Yadav 90Prashant Yadav 90 
Hi All,

Following is the code for creating multiple child records.

This code is invoked using process builder and condition to satisfy for firing process builder and creating multiple records is choosing value called "Yes" under a picklist called "Approved" on Parent Object which is "Opportunity Contract".

In sandbox this Code is working fine with all custom profiles, when i give them modify all permission for both the custom objects.

In production this code is working for systems administrator alone and not working for other profiles even with modify all permission and i getting following error and not able to save the record for creating multiple child records.

Attempt to de-reference a null object

Here is the code, any suggestions are highly appriciated

public class OppConAMInvocableClass {
    @InvocableMethod(label='Insert Child Records for Opportunity Contracts' description='Inserts the child records based on number of contract years.')
  public static void insertChildRecords(List<Opportunity_Contract__c> parentList) {
      List<Annual_Maintenance__c> childrecords = new List<Annual_Maintenance__c>();        
      for(Opportunity_Contract__c parent : parentList) {
        Integer numberYears = Integer.valueOf(parent.Contract_Years__c);
        for(Integer i=1;i<numberYears;i++) {
        //Account acct = [SELECT Id FROM Account where Id = :e.WhatId];
        Integer j = i + 1;          
        Annual_Maintenance__c child = new Annual_Maintenance__c();
            Child.Opportunity_Department__c =Parent.Opportunity_Department__c;
    Database.SaveResult[] results = Database.insert(childrecords);
    List<ID> itemIds = new List<ID>();
    for (Database.SaveResult result : results) {
      if (result.isSuccess()) {
    return itemIds;
Best Answer chosen by Prashant Yadav 90
Ajay K DubediAjay K Dubedi
Hi Prashant,

I have gone through your problem and found out following point:

Try recompiling all your classes after moving all your code to production org. Setup-->Apex classes-->Compile all classes.
This has worked before hoping same for you. For more please refer: https://developer.salesforce.com/forums/?id=9060G0000005Vu1QAE

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Ajay Dubedi    

Hi I'm working on communities and would like to customize the change password page that is displayed to the customer after a password reset. This is the url to the default changepassword-     /_ui/system/security/ChangePassword.  I have customized the changepassword vf page that Salesforce provides but when I try to test it out it still takes me back to the same old SF default changepassword. After much digging it appears to me that the changepassword vf page that's provided with the communities is tied to the user's personal profile. My question is where is the right page that needs to be customized or how can I make the change password link take the user to the custom page. Or is it even possible?



Best Answer chosen by Admin (Salesforce Developers) 

Hi Sumil - You would need to turn Chatter answers on in your SF org and then enable it for your communities(under site settings). Once this is done you can choose the visualforce page you want to use as your change password page. 

Ajay Anikar H RAjay Anikar H R 

Part of the module is where you create couple of profiles with object level permissions. Accordingly i have set the right permissions for account object (R/E/VA), Opportunity (R/C/E) -- NO VIEW ALL for Field Sales Profile.

Everytime i check the challenge am getting below error; any help.
Challenge Not yet complete... here's what's wrong: 
The Field Sales User does not appear to have the correct object permissions for Accounts and Opportunities.
Best Answer chosen by Ajay Anikar H R
N.M. SharmaN.M. Sharma
NO NO So far according to my Experience with ThrailHead if we miss someting very small it throwen error at that time we make really a very small mistake we make in it and when we grab this we found it is very small.
Gautam Kasukhela 15Gautam Kasukhela 15 
Hello All,
    Need help in resolving an issue. I am trying to display the Status picklist field on a lightning component. For this I have written a server side controller to fetch the values and set in the component. 
During the callback in the helper, I keep encountering an error where the reposne is ERROR and the message in the ERROR reads "Unable to read sObject". Below is the code: 

Component Code
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"

<aura:handler name="init" value="this" action="{!c.doInit}"/>

<aura:attribute name="case" type="Case" default="{'sObjectType': 'case'}"/>
<aura:attribute name="listOfStatusPicklistValues" type="list" default="[]" description="List of Status Picklist values on Case object"/>

<aura:attribute name="statusFieldAPI" type="string" default="status" description="API name of the Status field whose picklist values we want to fetch"/>
<aura:attribute name="originFieldAPI" type="string" default="origin" description="API name of the Origin field whose picklist values we want to fetch"/>

    <!-- CREATE NEW CASE -->
    <div aria-labelledby="newCaseForm">
        <!-- BOXED AREA -->
        <fieldset class="slds-box slds-theme--default slds-container--small">
        <legend id="newCaseForm" class="slds-text-heading--small 
          Add Case
        <!-- Create New Case Form : START -->
        <form class="slds-form--stacked">          
            <lightning:select aura:id="newCaseForm" label="Status"
                <aura:iteration items="{!v.listOfStatusPicklistValues}" var="status">
                    <option value="{!status}">{!status} </option>

            <lightning:select aura:id="newCaseForm" label="Case Origin"
            <lightning:textarea aura:id="newCaseForm" label="Description"
        <!-- Create New Case Form : END -->
      <!-- / BOXED AREA -->
    <!-- / CREATE NEW CASE -->
Controller Code:-
    doInit : function(component, event, helper) {
        //get the details of the Object and its fields that we want to retrieve. These have been defined
        // as attributes in the component.
        var picklistFieldAPI = component.get("v.statusFieldAPI");
        var objDetails       = component.get("v.case");

        //call the helper to fetch the values of the picklist from database


Helper Code
    fetchPickListValues : function(component,objDetails,picklistFieldAPI) {
            //invoke the server-side controller to get the picklist values
            var action = component.get("c.getPicklistValues");
                'objDetails' : objDetails,
                'picklistFieldAPI' : picklistFieldAPI
        //set callback action
            if(response.getState() == "SUCCESS"){
                //set the response in the component field
            } else if(response.getState() == "ERROR"){
                var errors = response.getError();

Client-Side Controller Code
public class FetchValuesFromDatabase {
    public static List<String> getPicklistValues(SObject objDetails, string picklistFieldAPI){
        List<String> pickListValues = new List<String>();

        //Check if the object type passed from the component is not null. I yes, return empty list
        Schema.sObjectType objType = objDetails.getSObjectType();
        if(objType == null){
               return pickListValues; 

        //Check if the field API names passed from the component are present on the object.
        //If not, return an empty list
        //Get the fields corresponding to the object in a MAP
        Map<String,Schema.SObjectField> objFieldsMap = objType.getDescribe().fields.getMap();
            return pickListValues;
        //Get the picklist values of the field
        List<Schema.PicklistEntry> pickListEntries = objFieldsMap.get(picklistFieldAPI).getDescribe().getPicklistValues();
        for(Schema.PicklistEntry ple: pickListEntries){
        System.debug('pickListValues: '+pickListValues);
        return pickListValues;

what am i missing ?​​​​​​​

Best Answer chosen by Gautam Kasukhela 15
Gautam Kasukhela 15Gautam Kasukhela 15
Figured it out 

Make sure 'sobjectType' in your attribute definition is the correct case. I had 'sObjectType' and it took me forever to figure out why it wasn't even calling the Apex controller. Got the answer from 
Best Answer chosen by Akshay Bhujbal 6
Maharajan CMaharajan C
Use the below formula:

OR( (ISBLANK(Phone)), LEN(Phone) <> 10 )


SFDC New learnerSFDC New learner 
Hi All,

I am trying to create a new contact. Once the record is saved in Salesforce, an email need to be sent along with the unique id.

I have created a formula field for the Unique ID and associated record ID to this field.

Now, when I try to send an email with Unique ID, it shows null value.

<apex:page controller="SubmitNewContactController" docType="html-5.0">
        <div class="slds-scope slds-box">
         <apex:outputPanel >
            <div class="slds-text-align_center slds-text-heading_medium"><p>Submit New Contact </p></div>
             <div class="slds-form-element">
                    <label class="slds-form-element__label"><abbr class="slds-required"></abbr> FirstName</label>
                <div class=" slds-scope slds-form-element__control">
                    <apex:input value="{!FirstName}" styleClass="slds-input" id="FirstName" />
                 <label class="slds-form-element__label"><abbr class="slds-required"></abbr> LastName</label>
                 <div class=" slds-scope slds-form-element__control">
                    <apex:input value="{!LastName}" styleClass="slds-input" id="LastName" />
                 <label class="slds-form-element__label"><abbr class="slds-required"></abbr> Phone</label>
                 <div class=" slds-scope slds-form-element__control">
                    <apex:input value="{!Phone}" styleClass="slds-input" id="Phone" />
                 <label class="slds-form-element__label"><abbr class="slds-required"></abbr> Email</label>
                 <div class=" slds-scope slds-form-element__control">
                    <apex:input value="{!Email}" styleClass="slds-input" id="Email" />
                 <label class="slds-form-element__label"><abbr class="slds-required"></abbr> Zipcode</label>
                 <div class=" slds-scope slds-form-element__control">
                    <apex:input value="{!Zipcode}" styleClass="slds-input" id="Zipcode" />
                 <div class=" slds-scope slds-form-element__control">
                    <apex:commandButton action="{!SubmitContact}" value="Submit"/> 
public class SubmitNewContactController {
    public Contact c{get;set;}
    public String FirstName{get;set;}
    public String LastName{get;set;}
    public String phone{get;set;}
    public String Email{get;set;}
    public String Zipcode{get;set;}
    public SubmitNewContactController(){
        c = new Contact();
    public PageReference SubmitContact(){
        c.FirstName = FirstName;
        c.LastName = LastName;
        c.phone = phone;
        c.Email = Email;
        c.MailingPostalCode = Zipcode;
        insert c;
        PageReference pr = new PageReference('/apex/ThankYouPage');
        Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
        String[] sendingTo = new String[]{c.Email};
        semail.setSubject('Registration is completed');
        semail.setPlainTextBody('Hi'+ c.name+'Thank you for registering.This is your UniqueID'+ c.Unique_ID__c);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail});
        return pr;


I am able to send the email but cannot capture the name and uniqueId in the email. It shows null in the email.
Can anyone please help me to fix the code?

Best Answer chosen by SFDC New learner
Anant KamatAnant Kamat
Your formula will have the value once the record is created in Salesforce. However without querying the fields explicitly, you will not be able to pass them to the email message. Fire the query below and get the values.

Contact c1 = [Select id,Unique_ID__c, Name from Contact where id = :c.id];

The use the c1.Name and c1.Unique_ID__c in your email message.

Let me know if it is working for you.



I tried to make the visualforce page renderas PDF in landscape with following styles


<style >
    @page {


But it is not working now. Is anybody face the same issue? or have any idea to render the PDF as landscape??



Best Answer chosen by Admin (Salesforce Developers) 

Following code will work...




@page {





Message Edited by prageeth on 09-29-2009 12:31 AM