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
OssieOssie 

Case Object

Hi,

 

Here is my code:

 

I would only like to show those contacts which are associated to the account in the case object.  But for some reason my Contact name field appears read only (ie.cannot see text box, just the label).  Any idea as to what I might be doing wrong??  

 

<apex:page StandardController="Case">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:inputfield value="{!Case.AccountId"/>
                <apex:inputField value="{!Case.Contact.name}"/>
             </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page> 

 

Please advise?

Best Answer chosen by Admin (Salesforce Developers) 
FromCRMWonderlandFromCRMWonderland
Use "contactId" in place of "Case.Contact.name". -- alok

All Answers

FromCRMWonderlandFromCRMWonderland
Use "contactId" in place of "Case.Contact.name". -- alok
This was selected as the best answer
rohitsfdcrohitsfdc

hello,

replace the line

<apex:inputField value="{!Case.Contact.name}"/>

 with

<apex:inputField value="{!Case.Contact.firstname}"/>
<apex:inputField value="{!Case.Contact.Lastname}"/>