Hot answers tagged

27

Salesforce1 is a new platform, complete with a host of new APIs and mobile UI tools. To oversimplify it, it's taking the Chatter mobile app, which up until this point has just been an app running on closed source code and building it into a platform, while really blowing out its capabilities. It's built on the premise that our business lives are ...


25

You can access the camera from a Salesforce1 app, using the HTML <input> tag with accept="image/*" to access either the camera or photo library, for example <input id="photoFile" type="file" accept="image/*"/> You can then use the HTML5 File API to upload image data. Here's an example using the Force.com REST API - you would change this to ...


15

As of today, there is a lwc module that you can import to get it: import formFactorPropertyName from '@salesforce/client/formFactor' formFactorPropertyName—A name that refers to the form factor of the hardware running the browser. Possible values are: Large—A desktop client. Medium—A tablet client. Small—A phone client. Pass the form factor to the ...


13

Salesforce1 is a new mobile application provided by Salesforce. There were previously a few different ways to connect to Salesforce using a mobile (iOS or Android - iPhone, iPad, Android tablet, etc.) device: Salesforce Classic, Salesforce Touch, and Chatter Mobile. This mobile application replaces the most recent application, Chatter Mobile, which has been ...


13

Having been involved in one of those applications, i can say that there was no official list of things they provided, maybe their will be in due course, though the documentation does a pretty good job of describing the features to use. As such having your package make use of one or more of the following Salesforce1 features is going to allow you to be ...


12

Among my contacts at SFDC, this is a "hot" feature request. Somehow here in Germany a lot of people come up with that requirement. At sf1 world tour in London, I attended the breakout session "Salesforce1 Platform Roadmap" and it was said, they are working on that, but at the moment, there is no offline support. So I would say: no offline support for now. I ...


8

Update (2017) The trick below is good for 90% of cases, especially if you need a placeholder to which rerender might eventually have to inject something. But it can cause problems if you render VF as PDF and you're using this conditional rendering to hide table rows; inside <apex:repeat> for example. (Of course best would be to filter the data in a ...


7

My biggest take away from the Salesforce1 mobile application is the ability to navigate back into the application from a custom VF Page (made available in the app through a chatter publisher action). This feature is documented here This allows you to build custom VF to aggregate and display custom views, then navigate back to the prebuilt Salesforce1 app'...


7

As a developer, you only need to create the connected app once, in a Developer Edition. You publish your app, and it's good to go. You do not need to create a connected app configuration in any other org. Users from other orgs can log in via your app, without there being a corresponding connected app in their own org.


7

Very interesting question. I was in a similar situation in an app a year back and here's what I researched and hacked together. Officially, you need to pick either the local or remote mode - both are NOT supported simultaneously. I did manage though to create an app with a local context and invoke my Visualforce pages in a WebView by passing the auth ...


7

That's a great question. We've tried using the bit.ly shorten API method in conjunction with an AMPscript HTTPGet function (to make a request to the API) to shorten a URL. This works well, but the problem was that we quickly hit a rate limiting issue where we started receiving a 403 HTTP Status codes back from bit.ly. It turns out that bit.ly has a monthly ...


7

No salesforce is not offering this anymore. Last year those who received this certification in the past got an email saying it will be retired soon.


6

As of the latest version of Chatter Mobile(v4.2), you can now include VF tabs in the app. Mark the VF page as Available to Mobile apps and create a tab that uses that page. Then go to Administer>Mobile Administration; you’ll find a new option called Mobile Navigation. This lets us rearrange “stage left” in the Chatter Mobile app. We can add and remove ...


6

The Mobile SDK currently supports the following approaches Native iOS Native Android Hybrid iOS Hybrid Android Although it uses Cordova for packaging which does support Windows 8 development, the support for being able to run your app as a WebView in Windows 8 is not provided in Mobile SDK. If you are developing a Salesforce app for Windows 8, you should ...


6

For those facing the same issue, we managed to work around it with this approach In Platform/ios/CordovaLib/Classes/CDWebViewDelegate.m, there is a method (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest with the following definition - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(...


6

Getting geolocaiton from mobile browser is easy if you are using a browser that supports it. Try below code, navigator.geolocation.getCurrentPosition(GetLocation); function GetLocation(location) { console.log(location); } Once you have got location to javascript, you can easily interact with salesforce API using javascript remoting or AJAX API. Try ...


6

Short answer - it works as expected If you select * a soup, you will get all the "internal" columns we create to support smartstore operations (more on this below). Columns that hold data from "indexed paths" use the type specified in the indexed spec (string, integer, floating etc). Since we don't support a type object, when you index non-leaf nodes, you ...


5

All data transmitted with JavaScript Remoting is JSON. You need never encode nor decode it. Eg: public List<Contact> findContactsForAccount(Id accountId, String lastName) { return [ SELECT Id FROM Contact WHERE AccountId = :accountId AND LastName LIKE :('%' + filter + '%') ]; } What goes up the wire is an array of the ...


5

You can do this, although you don't scan the code, rather you take a picture and attempt to process it. I've written a blog post on how to do this at: http://bobbuzz.me.uk/1fJ12Xw You can do it all on device using the jsqrcode JavaScript port of google zebra crossing (zxing). I couldn't get it working on a phone (presumably down to lack of processing ...


5

The refresh token may have an indefinite lifetime, persisting for an admin-configured interval or until explicitly revoked by the end-user. Since refresh tokens may expire or be revoked by the user outside the control of the client application, the client must handle failure to obtain an access token, typically by replaying the protocol from the start. In ...


5

Yes, you can put a link on your VF page using the target app's URI scheme. For example, skype://call?415-555-1212 will open the Skype app and start a call. Not every app has a URI scheme exposed, and those that do may not accept arguments. All of this depends very much on which app you're trying to open. However, because you're running this in a VF page ...


5

As a starting point, you can refer to this tutorial from Raja Rao (Salesforce Developer Relations Team) which explains how to integrate Swift in your existing Salesforce native iOS app. The source code is available here


5

That is correct, the browser on Windows Phone does not support target attribute for any hyperlinks. The <apex:outputLink> is treated similar to a <href> and it is not supported on Windows Phone. This has been confirmed by a Microsoft employee on this thread.


5

You can do a bulk upsert following the approach listed in this example. OfflineQueue.StoreRecords = function(records,error){ console.log('OfflineQueue.storeRecords'); navigator.smartstore.upsertSoupEntriesWithExternalId('Password__c',records, 'Id', function(){ console.log("Soup Upsert Success"); }, error); //if we're not ...


5

Just running down the checklist I think at least most of that should be possible in visualforce/lightning. It just depends on the needs of the company and the developers skill level. There are some items on the check list that don't seem to apply to websites but that could just be me being a bad web developer. For instance: Load various pages in the PWA ...


5

Edit Dec. 2020: Now available via @salesforce/client/formFactor import No there is no equivalent of $Browser.formFactor Aura global value provider in LWC. The addition of an equivalent is under discussion. For now, you can use CSS media queries and Element.getBoundingClientRect to make component adapt to the space available on the screen.


5

While Zak's answers isn't incorrect, it does require a bit more discovery once you click the links he provided. To be specific to the original question, in the Android SDK you will need to provide an implementation of the NotificationLaunchIntentProvider during the initialization of the SDK. In this implementation, you can build out the PendingIntent that ...


4

I know that this is an old problem, but I wanted to offer an update. I created a simple flow, loaded it on a simple VF page, created a VF tab and added it to my mobile navigation options for Salesforce1. I did not have any trouble with the buttons and was pleased to see that my simple Flow worked just fine on Salesforce1. Now to try it with a more complex ...


4

You can place links in email templates that navigate to the Salesforce1 app in the following format: com.salesforce.salesforce1://entity/view?entityId={Account.Id} I suggest you put that in alongside the standard {Account.Link} and give users a choice. e.g. To view this record please select either: {Account.Link} to view this in your browser com....


4

Or could you specifically navigate back to the record after editing? Is this in Visualforce? Via JavaScript, more here: http://www.salesforce.com/us/developer/docs/salesforce1/Content/vf_dev_best_practices_navigation.htm What you are running into is fairly standard browser behavior these days ... both desktop and mobile. To increase performance, the back ...


Only top voted, non community-wiki answers of a minimum length are eligible