• akhilesh_sfdc
  • 235 Points
  • Member since 2008

  • Chatter
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 114
 Hi all,
            i want to make one mobile app for community user.
          Is it possible to fetch the data using the REST API for community user? I don't want to use force.com site, i just want to give access of data using the REST              API to the community user. 
         so tell me is it possible or not?

  • September 11, 2014
  • Like
  • 0
Actually I'm developing Android app that use Salesforce SDK to get data from Salesforce.com. My user are Customer Portal license wich Facebook single sign on. Thats work ok. My users can sign in into my app using Facebook and use Rest API with Android SDK. In this scenario, is It possible to access a Facebook data using Facebook SDK or Facebook graph API directly?
With a long chatter feed your Account page may inolve lots of scrolling, or hiding the feed (defeating the point of having it!)

To the rescure, this old gem, tabbed Accounts! http://wiki.developerforce.com/page/Tabbed_Accounts_in_30_seconds

The BIG FAIL - mine or Salesforce's ?
Can I have my Salesforce1 users see the default layout, not this VF page? 
I am missing how to make this work on both platforms - please help! 
  • March 03, 2014
  • Like
  • 0
Dear Salesforce1 team, 
I have a 3rd party app which I am trying to integrate with spring'14 edition. I can see my custom 3rd party app coming on the Chatter Feed and I can aso see the Mobile Nav in the left NAvigation menu of my Saleforce1 iPAd app. However, when  I click on the left navigation tab for my app, it tries to open my app as a URL and I get the following message "This App must be invoked via a signed request!". 
Need your help in fixing this issue.

Hey everyone


I keep seeing documentation that the 10 minute default passcode timeout can be changed by the administrator but I can't find any documentation as to where, how and at what scope this can be changed.


Does anyone know how to do this or can point me to some documentation or tutorial as to how this is done?



Currently I am tweaking the source code of the SDK 2.0 to look for index.html in the 'app' instead of 'www' folder. As you know, AngularJS by default is using a folder named 'app'.


I am wondering, what is the best way to go forward, rename the folder to 'www' and make what ever adjustments are necessary in Angular, or continue tweaking the source code of the mobile SDK?


Is there a chance the www folder in the mobile SDK becomes configurable in the future?




After watching the webinar on the mobile sdk I downloaded the Contact Viewer app from github and deployed the code to my free developer org but I keep getting "Failed to obtain access" message from the site. I followed the instructions on the readme to the point except


" 4. Lastly, you need to whitelist the instance URL on which your users will live. You can add that whitelist from Setup -> Security Controls -> Remote Site Settings"


Since I'm just doing this to self test its alright to skip this step, I really don't know the case where I would need to whitelist the URL.


Any ideas on that "Failed to obtain access" message would be amazing, since I really want to jump into the html5/hybrid app bandwagon with salesforce.



  • January 16, 2012
  • Like
  • 0

When I followed these directions, I got errors.   
npm -g install cordova

Installs the latest version of cordova which is doesn't work with SFDC.   

Cordova 4.0 platform has a slew of underlying architecture changes that make it incompatible with the existing Mobile SDK out of the box. Classes have been renamed and moved around. Also, Cordova 4.0 requires the usage of their whitelist plugin for any network requests.
In short, the current version of Mobile SDK won't work with Cordova 4.0. Any 3.x version of Cordova should work fine.

When there is a successful login after a failed one, Salesforce mobile SDK takes the user to salesforce website instead of launching mobile app page. Its an hybrid app built using cordova and SF Mobile SDK. Login is performed by SDK. Anyone having same issues?
I have a requirment of creating a Hybrid app (HTML+CSS+Jquery) + SalesforceSDK( Outcome Should be .apk or .ipa file )  which should be able to communicate with Salesforce inbuilt Objects Like Leads, opportunity, Account and Contact.
Few Usecases :I should be able to create a lead from my app
I should be able to convert Lead to Opportunity from app and such other usecases..

I got the SOAP API documentation but that is for Native Application(Based on Java) .
How do I communicate from Jquery to Salesforce to fetch the necessary objetcs.
Thanks in advance
Hi All,

I have integrated "SalesforceMobileSDK-iOS-Distribution" in my existing iOS application but I am not getting from where to start it to get the login screens and which class gives me a login screen of salesforce.

My scenario is very simaple:
  1. I have a home screen in my application and from there I have to navigate/show thire (Salesforce) login screen.
  2. User will enter username and password.
  3. Salesforce shoud validate and redirect (back) to my HOME screen with token/sessionID.
  4. That  token/sessionID will use internally in my application.
I have integrated "SalesforceMobileSDK-iOS-Distribution" in my application but I'm unable to move forward. I have connected app info such as Client ID,Client secret and Callback url.
Can you please help on this. Thanks in advance.

I have followed the steps on how to setup and install a hybrid local application on android from the 'Mobile SDK Development Guide - Salesforce Mobile SDK 3.0' documentation. However I keep hitting the same error.

After importing the relavant projects into Eclipse, as stated by in the forcedroid output, there are 115 errors. I noticed the cordova reference was invalid in the SalesforceSDK project, pointing to '..\..\external\cordova\framework'. I change this to point to the CordovaApp-CordovaLib project in Eclipse, and after rebuilding the errors were gone.

However whenever I run the application I then get the following error:
12-14 22:42:34.313: E/AndroidRuntime(17385): FATAL EXCEPTION: main
12-14 22:42:34.313: E/AndroidRuntime(17385): Process: com.testapp.mytestapp, PID: 17385
12-14 22:42:34.313: E/AndroidRuntime(17385): java.lang.RuntimeException: Unable to instantiate application com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4491)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.access$1500(ActivityThread.java:144)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Handler.dispatchMessage(Handler.java:102)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.os.Looper.loop(Looper.java:135)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.ActivityThread.main(ActivityThread.java:5221)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.reflect.Method.invoke(Method.java:372)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
12-14 22:42:34.313: E/AndroidRuntime(17385): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync" on path: DexPathList[[zip file "/data/app/com.testapp.mytestapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-14 22:42:34.313: E/AndroidRuntime(17385):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.Instrumentation.newApplication(Instrumentation.java:979)
12-14 22:42:34.313: E/AndroidRuntime(17385):     at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
12-14 22:42:34.313: E/AndroidRuntime(17385):     ... 10 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Suppressed: java.lang.ClassNotFoundException: com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.Class.classForName(Native Method)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-14 22:42:34.313: E/AndroidRuntime(17385):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-14 22:42:34.313: E/AndroidRuntime(17385):         ... 13 more
12-14 22:42:34.313: E/AndroidRuntime(17385):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I use the Eclipse ADT Bundle.
Version of Java is 1.8 (I have tried with 1.6 also)
Target API was 19
forcedroid version is 3.0.1

I suspect that the real issue will be something to do with the invalid project reference, as I wouldn't expect any errors after runing a fresh create and import like this.

Any help would be greatly appreciated.
In an iOS app created using forceios, for SSO I am trying to establish a unique key using the SFIdentityData orgId and the SFUserAccount organizationName on the currentUser property of the SFUserAccountManager.  The orgId in the currentUser idData is set, but the organizationName on the actual user is nil.
Is this property not actually used? or is it tied to something else on the user in SalesForce that's just not set on the two instances I've tried.
I am using the latest SalesforceMobileSDK (3.0) to build native Android apps. I use single sign-on and get a new restClient every time my main activity has resumed. 
public void onResume(RestClient client)
	restClient = client;
When I try use the restClient a day after the initial login (and after the initial authToken expired) 
private void sendRequest(String soql) throws UnsupportedEncodingException
	RestRequest restRequest = RestRequest.getRequestForQuery(getString(R.string.api_version), soql);

	restClient.sendAsync(restRequest, new RestClient.AsyncRequestCallback()
		public void onSuccess(RestRequest request, RestResponse result)
			//process results here...

		public void onError(Exception exception)
			Toast.makeText(MainActivity.this, MainActivity.this.getString(SalesforceSDKManager.getInstance().getSalesforceR().stringGenericError(), exception.toString()), Toast.LENGTH_LONG).show();
I get an 'java.io.IOException: No authentication challenges found'. This is all basic stuff and I never got this error with the previous SDK (2.0) using the same code above. After some searching I have discovered that this is caused by an unauthorized response from the server (Salesforce) but I have verified that I am correctly sending the new auth token with the request that i received back from Salesforce in my onResume method.

I have these three scopes on the connected app and in my bootConfig:
<string-array name="oauthScopes">
I am using a Samsung Galaxy S5 running Android 4.4.2 if that info helps. Is someone able to tell me why i get this and more imortantly how to fix it?

I am creating a Android Application and I am using the Salesforce SDK.

As recommended I am using the REST API to get data from salesforce servers. All the examples indicate to hardcode the parameters to work with JSON Objects, for example to get the Id of a contact:


Is there any better way to avoid using the key of the json object as a string?
Normally I am using GSON library to parse the jsonObjects into my java objects. Are there java classes like Contact or Account available?

Thank you for your help!

Hi All,
I have a native iOS app that is trying to update the task. I am getting the following error response from the salesforce web when trying to sync the changes:

 errorRecords =     (
            errors =             (
                    errorfields = "()";
                    message = "insufficient access rights on object id";

I verified and the user (partner user) profile has access to Task object and all the fields within the task.
Am I missing anything?

Hi ,
We have implemented the custom salesforce login in our iPhone application, its working and we are getting a response like below format
"access_token" = "00D90000000zlFl!AQ8AQPivkCx4kUOaZfqjBLjH12CTy6wqV6SOx2FI99jsgdq3cE8Odnq7DGwUD7iP2CbleouktLET0EOgg10lf4qHG5Yzz6nI";
    id = "https://login.salesforce.com/id/00D90000000zlFlEAI/00590000003LHDxAAO";
    "instance_url" = "https://ap1.salesforce.com";
    "issued_at" = 1415788230586;
    signature = "QVL28zZsPewgtfcyh61hVZNx+REHrJ50jLlkzl8PP8A=";
    "token_type" = Bearer;

Once user is loggedIn we wanted to redirect him to salesforce home page (https://ap1.salesforce.com), so we have analysed and understnad that after custom login is sucess we need to load the "https://ap1.salesforce.com" URL in iPhone webview with the following cookies: sid & sid_Client.
I believe sid means access_token from the above response.
Can you pelase let us know how to get the sid_Client from the custom login service response.
Hi guys i am trying to acess the following link to start learning about mobile development SDK. But i keep getting "You are forbidden to view this page." I have tried different browsers, and refreshed multiple times with secure browsing and still nothing is happening.


can anyone please help here?
I have created a mobile app in Android and iOS using the Salesforce SDK. I want to add functionality of multi currency by using isMultiCurrencyOrganization() method from the UserInfo class. Now I am quite new to Salesforce mobile SDK so I don't know how I can use the methods of UserInfo class and check if user's organization has multi-currency enabled.

I need a few pointers as to how to recursively fetch more than the 2000 record limit imposed by the REST API. I understand how one might do this using purely forcetk (with nextRecordsUrl and the 'done' attribute of the response) but how would I code this using the Backbone extensions?

I've included example code below. Everything works apart from being able to re-query Salesforce (using REST API) to retrieve the additional records.

My stack = Mobile SDK 2.1, Smartsync, Smartstore, Backbone, JQM, RequireJS

// The Contact Model
var Contact = Force.SObject.extend({
    sobjectType: "Contact",
    fieldlist: ["Id", "Name"],
    cache: function() { return App.caches.Contacts;},
    cacheMode: function(method) {
        if (!App.models.offlineTracker.get("isOnline")) {
            return Force.CACHE_MODE.CACHE_ONLY;
        else {
            return (method == "read" ? Force.CACHE_MODE.CACHE_FIRST : Force.CACHE_MODE.SERVER_FIRST);

// The Contact Collection
var ContactCollection = Force.SObjectCollection.extend({
    model: Contact,
    fieldlist: ["Id", "Name"],
    cache: function() { return App.caches.Contacts;}, 

// Fetch the records - assume over 2000 contact records
contacts = new ContactCollection();
contacts.config = {type:"soql", query:"SELECT Id, Name FROM Contact"};
    success: function (data) {
     if (data.hasMore()) {
      // how can I use data.getMore()? I get 'RangeError: Maximum call stack size exceeded'

Many Thanks
  • January 21, 2014
  • Like
  • 1