• drichardson
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Good Morning Everyone,
 
I am trying to access information on a contact from a task which is referencing it. When I use the following syntax I receive an error that phone is not a valid field. I assume this is because the field is a lookup for either a contact or a lead. So how do I get the phone number out?
 
Thanks in advance for your help.
 
Dave
 
Code:
<apex:page standardController="Task" >
    <iframe id="dialer" style="display:none"></iframe>
    <apex:form >
        <apex:pageBlock title="Task Detail">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" value="Edit" id="editButton"/>
                <apex:commandButton action="{!delete}" value="Delete" id="deleteButton"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Details" showHeader="false">
                <apex:pageBlockSectionItem >
                    Assigned To
                    <apex:outputField value="{!task.owner.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.priority}" />
                <apex:outputField value="{!task.subject}" />
                <apex:outputField value="{!task.activitydate}" />
                <apex:pageBlockSectionItem >
                    Task Record Type
                    <apex:outputField value="{!task.recordtype.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.status}" />
                <apex:pageBlockSectionItem >
                    Related To
                    <apex:outputField value="{!task.what.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.result_date__c}" />
                <apex:outputField value="{!task.who.name}" />
                <apex:outputField value="{!task.closed_by__c}" />
                <apex:outputField value="{!task.who.phone}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>

 



Message Edited by mtbclimber on 12-06-2008 11:40 AM
Good Morning Everyone,
 
I am trying to access information on a contact from a task which is referencing it. When I use the following syntax I receive an error that phone is not a valid field. I assume this is because the field is a lookup for either a contact or a lead. So how do I get the phone number out?
 
Thanks in advance for your help.
 
Dave
 
Code:
<apex:page standardController="Task" >
    <iframe id="dialer" style="display:none"></iframe>
    <apex:form >
        <apex:pageBlock title="Task Detail">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" value="Edit" id="editButton"/>
                <apex:commandButton action="{!delete}" value="Delete" id="deleteButton"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Details" showHeader="false">
                <apex:pageBlockSectionItem >
                    Assigned To
                    <apex:outputField value="{!task.owner.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.priority}" />
                <apex:outputField value="{!task.subject}" />
                <apex:outputField value="{!task.activitydate}" />
                <apex:pageBlockSectionItem >
                    Task Record Type
                    <apex:outputField value="{!task.recordtype.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.status}" />
                <apex:pageBlockSectionItem >
                    Related To
                    <apex:outputField value="{!task.what.name}" />
                </apex:pageBlockSectionItem >
                <apex:outputField value="{!task.result_date__c}" />
                <apex:outputField value="{!task.who.name}" />
                <apex:outputField value="{!task.closed_by__c}" />
                <apex:outputField value="{!task.who.phone}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>

 



Message Edited by mtbclimber on 12-06-2008 11:40 AM