Sunday, 6 December 2015

IOS and Visualforce in Salesforce 1 app Hicups

Lighting is out and looks like its  the future of customization of Salesforce 1 mobile pages .Speaking of present still we have large number of apps having visualforce page for the Salesforce 1 app build using either angular(or other frameworks ) or plain old visualforce styled to responsive design .

This blogpost is sharing some insights into common issues that I encountered with Visualforce inside SF1 container when I was testing the functionality with iPhone or iPad.


Lets list all of them one by one and list the work around for issues as these have no proper fix and are logged as issues by SFDC


1)Key freezing issue with HTML input tags


This is one of the primary issues that's  really show stopper .If you have a visualforce and you use apex:input or normal HTML input and double tap the cursor on the text field you will notice that your keys are freezed and text you enter dont appear on the input box .


This looks to be serious issue with new version of IOS and Salesforce 1 app .Even you are using twitter typeahead for autocomplete or lookups this issue can be easily observed and keys will freeze once you make selection .


The workaround for this is to include a small script at the bottom of the page that resolves this .Please note this is a workaround until this is fixed officially



2)Not able to scroll the iframe embedded in Visualforce inside SF1 container for iPad or iPhone 

This is another common bug and has something to do with IOS webkit inside SF1 .The workaround is below small snippet that adds scrolling behavior needed



There are also certain things that we need to note about navigation pattern we follow in SF1 specific apps

1)When navigating to the external world the right function to use is as below

navigateToURL(​url​[, isredirect])

If you want SF1 container not to remember the history set redirect parameter to the true state.

2)Use back function to navigate to the back and use redirect parameter as true if you want your page to refresh

back(​[refresh])

Using frameworks to develop SF1 apps can increase the speed of app build .Also for complex SF1 visualforce page if you have too many actions and you are packaging for as an appexchange app its worth to write some automation testing using selenium or using protractor whatever you feel comfortable just to not scratch your head if something breaks later due to SFDC releases or due to some code change during upgrade.

I hope you enjoyed this post and will help you troubleshoot issues with SF1 app

7 comments:

  1. Positive site, where did u come up the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include.
    online phone shop

    ReplyDelete
  2. Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post.
    IOS DEVELOPMENT in Seattle

    ReplyDelete
  3. Can I simply say what a relief to search out somebody who actually knows what theyre talking about on the internet. You undoubtedly know the right way to carry a difficulty to gentle and make it important. More folks must read this and understand this facet of the story. I cant believe youre not more common since you undoubtedly have the gift.apps pour pc

    ReplyDelete
  4. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Iosem

    ReplyDelete
  5. Techforce services is a Salesforce Consulting Services in Australia Specializing in delivering end to end Salesforce solutions ,Consulting, Implementation DevOps partners in Australia We deliver applications and services more rapidly and reliably, but it’s more than a methodology – it cuts to the very core. Salesforce Data Analytics let us help you become a data driven organization and ensure your data is working hard for your business, This includes implemention
    Salesforce consulting companies
    Salesforce top partners
    Staff augmentation companies
    Salesforce DevOps services
    Salesforce integration companies
    Salesforce Implementation services
    Salesforce Health Check
    Salesforce DevOps
    Managed project services

    ReplyDelete
  6. It helps you to build better internal resources along with a good staffing that helps in suitable salesforce growth. scenario based salesforce interview questions

    ReplyDelete
  7. You can found a professional institute who are famous for Salesforce Online Training in Ameerpet, Hyderabad, India. Are you really interested to make your career as Salesforce Consultant? Then take a chance to interact with us, our Salesforce Online Training will surely make a difference. Salesforce training in Hyderabad

    ReplyDelete

Introducing Lightning Base Components

Lightning Base Components are great addition to the platform and in fact revolutionary .One of the concerns around lightning component ...