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
Rui Wang 7Rui Wang 7 

VF apex:inputField for lookup field

Currently, when our user logs a case through the Salesforce mobile app on their phone, the account name DO NOT come across.
Tested on Apple iPhone on cases. Seems to be happening every time. We have customised VF to capture the case information.
These fields are simply left empty. Can we have any tech workaround for this, thank you in advance!

Tech Note:
'Practice Name' & 'Contact Person Name' mentioned in the issue description are in the Visualforce page, rendered as 
<apex:inputField value="{!case.AccountId}" required="true"/>
<apex:inputField value="{!case.ContactId}" required="true"/>
Akshay_DhimanAkshay_Dhiman
Hi Rui Wang,

Try from given below code on Internet Explorer (Browser).
----------------------------      Parent page           --------------------------------------------
<apex:page controller="VisualForceTest10" id="pg1" >
    <head>
        <script>
        function openChild() {
            childWindow = open('/apex/ContactLookup2Test10', 'pagename', 'resizable=no,height=400,width=750 top=100,left=300');
        }
        function setValue(myVal) {
           document.getElementById('pg1:frm1:pb1:pbs1:val').value = myVal;
            
        }
        </script>
    </head>
    <apex:form id="frm1">
        <apex:pageBlock mode="maindetail" id="pb1">
            <apex:pageBlockButtons id="pbb1" >
                <apex:commandButton action="{!edit1}" value="Edit" />
                <apex:commandButton action="{!delete1}" value="Delete" />
                <apex:commandButton action="{!clone1}" value="Clone" />
            </apex:pageBlockButtons>
            <apex:pageBlockSection columns="2" id="pbs1">
                <apex:outputField value="{!getcon.ownerid}" />
                <apex:outputField value="{!getcon.phone}" />
                <apex:outputField value="{!getcon.name}" />
                <apex:outputField value="{!getcon.homePhone}" />
                
                
                <apex:inputtext value="{!lookup1}" label="Account id"  id="val"/>
                <apex:commandButton reRender="val" onclick="openChild()"  value="lo"/>
                
                <apex:outputField value="{!getcon.mobilephone}" />
                <apex:outputField value="{!getcon.title}" />
                <apex:outputField value="{!getcon.otherphone}" />
                <apex:outputField value="{!getcon.department}" />
                <apex:outputField value="{!getcon.fax}" />
                <apex:outputField value="{!getcon.birthdate}" />
                <apex:outputField value="{!getcon.email}" />
                <apex:outputField value="{!getcon.ReportsToId}" />
                <apex:outputField value="{!getcon.AssistantName}" />
                <apex:outputField value="{!getcon.leadsource}" />
                <apex:outputField value="{!getcon.AssistantPhone}" />
                
                
                <apex:outputField value="{!getcon.Languages__c}" /> 
                <apex:outputField value="{!getcon.Level__c}" />
                <apex:outputField value="{!getcon.createdbyid}" />
                <apex:outputField value="{!getcon.lastmodifiedbyid}" />
                <apex:outputField value="{!getcon.description}" />
                
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
-------------------------------------          child page              ----------------------------------------------------
<apex:page controller="VisualForceTest10" sidebar="false" showHeader="false" id="pg">
    <head>
        <script language="javascript" type="text/javascript">
        
        function updateParent(oVal)
        {
            var oVa = document.getElementById('pg:for:namelok').value=oVal;
             window.opener.setValue(oVa);
             window.close();
             return false;
        }
        
        </script>
    </head>
    <apex:form id="for">
        <apex:inputText style="margin-left:20px; margin-top:10px;" id="namelok" />&nbsp;&nbsp;<apex:commandButton value=" Go " />&nbsp;&nbsp;<apex:commandButton value=" New " /><br/>
        <p style="margin-left:20px;"> You can use "*" as a wildcard next to other characters to improve your search results.</p> 
        <br/><br/>
        
        <apex:outputPanel layout="block"  style="height:260px; overflow:scroll;margin-left:20px;">
            <apex:pageBlock title="Recently Viewed Accounts">
                <apex:pageBlockTable value="{!Accounts}" var="acc">
                    <apex:column onclick="javascript:return updateParent('{!acc.name}')"  value="{!acc.Name}"/>
                    <apex:column value="{!acc.site}" />
                    <apex:column value="{!acc.ownerid}" />
                    <apex:column value="{!acc.type}" />
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>
-------------------------------------          apex Controler              ----------------------------------------------------
public class VisualForceTest10{

    public String getLookup1() {
        return null;
    }
    public String lookup1 { get; set; }
    
    public Contact getcon{get;set;}
    
    public VisualForceTest10()
    {
        getcon=new Contact();
        getcon= [Select Title,
                 ReportsToId,
                 Phone,OwnerId,
                 OtherPhone,
                 OtherAddress,
                 Name,
                 MobilePhone,
                 MailingAddress,
                 AssistantName,
                 Level__c,
                 LeadSource,
                 LastModifiedById,
                 Languages__c,
                 HomePhone,
                 Fax, 
                 Email,
                 Description,
                 Department,
                 CreatedById,
                 Birthdate,
                 AssistantPhone,
                 AccountId
                 From Contact where AccountId!=null limit 1];
    }
   
    public list<Account> getAccounts()
    {
        return [select id,name,site,Ownerid,type from Account limit 30];
    
    }
    public void edit1()
    {
    }
    public void delete1()
    {
    }
    public void clone1()
    {
    }
}

  if you found this answer helpful then please mark it as best answer so it can help others.   
  
  Thanks 
  Akshay