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
Vijay DOMINICVijay DOMINIC 

[Visualforce Mobile] Implementing Object-Specific Actions with Visualforce Pages

Hello,
I can't manage to finish this challenge. I got this error : 
" The 'ShowAssistantInfo' page isn't referencing the Assistant Name variable."
I used the <apex:variable> to create the variables but still got the error.

Here is my code :
<apex:page docType="html-5.0" standardController="Contact" title="Assistant Information">
    <apex:variable var="AssistantName" value="{!Contact.Name}" />
    <apex:variable var="AssistantPhone" value="{!Contact.Phone}" />
	<p>Assistant : {!AssistantName}</p>
	<p>Phone : <a href="tel:{!AssistantPhone}">{!AssistantPhone}</a></p>
</apex:page>

Thanks
bryan.andersonbryan.anderson
You want to reference the fields "AssistantPhone" and "AssistantName" standard fields on the Contact object, not "Name" and "Phone".
Vijay DOMINICVijay DOMINIC
Finised the challenge. It never crossed my mind that these fields were present in Contact.
Thanks for the help Bryan!
Andrew EversleyAndrew Eversley
To Bryan and Vijay, I want to thank you both for the insight on this challenge. I was running into some issues myself but you both cleared up my errors.
Lynda Elbay 6Lynda Elbay 6
Hello, 
if you need some help here my version : (french speaker so label in french :) )
<apex:page docType="html-5.0" title="ShowAssistantInfo" standardController="Contact" >
  <apex:pageBlock >
    <apex:outputfield label="Nom de l'assistante" id="nomassistante" value="{!Contact.AssistantName}"></apex:outputfield>
    <a href="tel : {!Contact.AssistantPhone}">{!Contact.AssistantPhone}</a>  
    </apex:pageBlock>
</apex:page>
Dennis Keizer 2Dennis Keizer 2
Hi, try this:

<apex:page docType="html-5.0" standardController="Contact" title="Assistant Information">
    <apex:variable var="AssistantName" value="{!Contact.AssistantName}" />
    <apex:variable var="AssistantPhone" value="{!Contact.AssistantPhone}" />
    <p>Assistant : {!AssistantName}</p>
    <p>Phone : <a href="tel:{!AssistantPhone}">{!AssistantPhone}</a></p>
</apex:page>