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: https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.create_client_form_factor Hope that helps


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 ...


9

You need to set the page to Available For Salesforce Mobile Apps. This is found in Setup > Develop > Pages > Edit (Page Name). First, you need to specify a page version of at least 27.0 (on the Version Settings tab), then you can check the box to make the page available. You can now also add pages to the navigation menu, under Setup > Administration > Mobile ...


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

I wrote ForcePad. Check out item 3 under the getting started section: (Optional) ForcePad connects to environments that are not otherwise API-enabled, like GE and PE orgs, by using a partner token. If you have a Salesforce partner token, paste it into RootViewController.h under PartnerTokenId. That said, getting a partner token is a little ...


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

This is by design, refer this bug for this issue on Github Force.com iOS SDK which was closed with the appropriate explanation - Github Issue 392


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

This is a known issue and has been successfully reproduced by Salesforce support as confirmed here. As for workarounds, I think "formula fields that somehow check if the user is on mobile" is going to be quiet difficult so I'd advise on creating a custom list view for mobile. Depending on which HTML5/ responsive CSS framework, there are components available ...


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.


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