• Shawn Clark
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi, 

This works great on the website and one/one.app, but I cannot get it working on the iPhone. Anyone know how to do this? 

I have a Command button that calls this script from my main visualforce page:
<script>  
          var paths = '/apex/TestVCard'; 
          function onVCard() 
            {
                if( (typeof sforce != 'undefined') && (sforce != null) ) 
                {
                    sforce.one.navigateToURL(paths);
                }
                else {window.parent.location=paths;}
            }
</script>

It should then open this visualforce page, that will create and serve up the VCard for download: 
 
<apex:page showHeader="False"   cache="True" contenttype="text/x-vcard#TempImport.vcf; charset=utf-8">
BEGIN:VCARD
VERSION:2.1
FN:Bob Smith
END:VCARD
</apex:page>


Any thoughts? 

Thanks, 

Shawn

I build a custom controller extension, and simply want to override the action that occurs when the user hits "Cancel", but for some reason its not working. I can call the method from another Command Button (No Results Match) and it will perform this method, but I want to leverage the standard Cancel to set a couple parameters and move them back to the Main page. Any Idea why this isn't working?
public PageReference cancel(){  
       ShowMasterCreate = true;
       ShowConnectedCreate = false;
       PageReference pageRef= new PageReference('/apex/ContactSearchMain');
       pageRef.setredirect(false);       
       return pageRef; 
       }

User-added image

Thanks, 

Shawn
 

Hi, 

Is there anyway to access the "Import from Device" feature that is available on Salesforce1 from the Contacts Object when you hit New button, from a visualforce page? I am learning about Cordova/PhoneGap and dynamic components on the visualforce page, so I guess I could create my own Hybrid App that allows me to get contacts from the iOS device, but was hoping there was a way to leverage this function, since it is now standard on the Contact object. Any thoughts?

Thanks, 
Shawn
How can I refresh a Lead Detail page when running in Salesforce 1 ?

if( (typeof sforce != 'undefined') && (sforce != null) ) 
{
  // Running in Salesforce 1
  How do I refresh the page when running in Salesforce 1 ?
}
else
{
  // Not running in Salesforce 1
  var currentURL =  "https://{!URLForPage}/{!Lead.Id}";
  top.location.href = currentURL;
}
  • March 12, 2015
  • Like
  • 0
Hi, 

Is there anyway to access the "Import from Device" feature that is available on Salesforce1 from the Contacts Object when you hit New button, from a visualforce page? I am learning about Cordova/PhoneGap and dynamic components on the visualforce page, so I guess I could create my own Hybrid App that allows me to get contacts from the iOS device, but was hoping there was a way to leverage this function, since it is now standard on the Contact object. Any thoughts?

Thanks, 
Shawn