+ Start a Discussion
Joseph WinterJoseph Winter 

Trailhead: Use the Salesforce Lightning Design System to Style Visualforce Pages Issue

Hi. Working through the Visualforce Mobile module, and im haivng throuble with the 3rd unit. 

Im getting this issue:
"Challenge Not yet complete... here's what's wrong: 
The 'MobileContactList' Visualforce page does not appear be displaying the contact name or contact phone."


The code I am using is:

<apex:page showHeader="true" sidebar="true" standardController="Contact" recordSetVar="contacts">
	<head>
	<apex:slds />
	</head>


	<apex:repeat value="{!contacts}" var="c">
		<dl class="slds-list_horizontal slds-wrap">
			<dt class="slds-item_label slds-text-color_weak slds-truncate" title="Contact Name:">{!c.Name}</dt>
			<dd class="slds-item_detail slds-truncate" title="Mobile Phone Number:">{!c.MobilePhone}</dd>
		</dl>
	</apex:repeat>

</apex:page>
Which then displays this;

User-added image
Which looks like it works, as long as the Contacts list view is set to view all (otherwise nothing displays).

Is this just another case of the trailhead looking for a very specific solution? I can't seem to find much help on this one.

Thanks
Best Answer chosen by Joseph Winter
Shubham NandwanaShubham Nandwana
Hi Joseph,
You are getting this error because you have to print 'phone' and not 'MobilePhone'. Use  {!c.Phone} instead of {!c.MobilePhone}.
Hope this helps. Mark this as best answer if it solves your error.

Best Regards,
Shubham Nandwana.
AppPerfect Corp.
salesforce@appperfect.com
408-252-4100
http://www.appperfect.com/services/salesforce/

All Answers

Shubham NandwanaShubham Nandwana
Hi Joseph,
You are getting this error because you have to print 'phone' and not 'MobilePhone'. Use  {!c.Phone} instead of {!c.MobilePhone}.
Hope this helps. Mark this as best answer if it solves your error.

Best Regards,
Shubham Nandwana.
AppPerfect Corp.
salesforce@appperfect.com
408-252-4100
http://www.appperfect.com/services/salesforce/
This was selected as the best answer
{!Piyush_soni__c}{!Piyush_soni__c}
Hey Joseph,
in contact object we have bacislly 5 type of standard Phone fields :

HomePhone
MobilePhone
OtherPhone
Phone
AssistantPhone

you can find all contact availbale fields here (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contact.htm) :

to complete this challange you have need to use Phone field, so update your line number 10 with below code :
<dd class="slds-item_detail slds-truncate" title="Mobile Phone Number:">{!c.Phone}</dd>
Thanks
Let us know if it helps you
 
Joseph WinterJoseph Winter
Thanks all, I was indeed using the wrong phone field, I completely missed that. 
Charles ThompsonCharles Thompson
... And the author of the Trailhead Unit needs to get his or her phone fields right - and make it clear in the script what is expected!
Thomas HThomas H
Thanks   !!     That one has been nagging me for awhile

User-added image


<apex:page showHeader="true" sidebar="true" standardController="Contact" recordSetVar="contacts">
    <head>
    <apex:slds />
    </head>
    <apex:repeat value="{!contacts}" var="c">
        <dl class="slds-list_horizontal slds-wrap">
            <dt class="slds-item_label slds-text-color_weak slds-truncate" title="Contact Name:">{!c.Name}</dt>
            <dd class="slds-item_detail slds-truncate" title="Mobile Phone Number:">{!c.Phone}</dd>
        </dl>
    </apex:repeat>
</apex:page>
User-added image
Phillip Edward 1Phillip Edward 1
Thank you All, I am really happy to say it’s an interesting post to read.
kodi (https://www.kodi.link/)