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
knshivknshiv 

Any documentation for mobile development

Hi,

 

I am looking for in depth mobile development documentation. I have done exposing Account, contact  etc. objects to mobile and create mobile configuration and it works fine. But I am interested in developing VF pages for BlackBerry or iPhone.

 

Please let me know the best practices and any material to read.

 

Thanks

 

_Prasu__Prasu_

Salesforce Mobile Implementation Guide PDF

Did you checked this ?

 

knshivknshiv

public class MobileHome {
  private List<Account> accounts;
  public List<Account> getAccounts() { return accounts; }

  private List<Contact> contacts;
  public List<Contact> getContacts() { return contacts; }

 
  public MobileHome() { // constructor
    String q = System.currentPageReference().getParameters().get('q');
    String c = System.currentPageReference().getParameters().get('c');

    if (q != null) {
      String fuzzy = '%' + q + '%'; // add wild cards
      accounts = [select id,name,phone,fax from Account where name like :fuzzy limit 10];
    }
    if (c != null) {
      String fuzzy1 = '%' + c + '%'; // add wild cards
      contacts = [select id,name,phone from Contact where name like :fuzzy1 or phone like :fuzzy1 limit 10];
    }
  }
}

<apex:page showheader="false" sidebar="false" controller="MobileHome" >
		<apex:sectionHeader title="Hello {!$User.FirstName}"/>
		<form name="searchForm" method="post" action="#" >
		    <div style="font-weight:bold; height:20px;">Account Name:
			    <input type="text" name="q" size="10" id="input" />
			    <input type="submit" class="button" value="Search" name="aid" />
		    </div>
		</form>
		<form name="searchForm1" method="post" action="#" >
		    <div style="font-weight:bold; height:20px;">Contact Name:
		    <input type="text" name="c" size="10" id="input" />
		    <input type="submit" class="button" value="Search" name="aid" />
		    </div>
		</form>
		
		<hr />
		
		<apex:dataList value="{!accounts}" var="each" >
		    <apex:outputLink value="/apex/MobileAccount">{!each.Name},</apex:outputLink>
		    {!each.Name}, {!each.phone}
		</apex:dataList>
						              
		<apex:dataList value="{!contacts}" var="each1" >
		    {!each1.Name}, {!each1.phone}
		</apex:dataList>
</apex:page>

 

Prassanna,

 

Thanks for quick reply. Yes I have been reading this documentation.

 

But the problem I am facing is the performance. I have created a very simple VF page for mobile but it is very slow.  Look at the page and the controller.

 

 

 

_Prasu__Prasu_

You are trying this for iPhone or any other?

knshivknshiv

It works fine in iPhone but not in BlackBerry. It is very slow in BlackBerry.