I can't find a detailed explanation in the Mobils SDK Development Guide about how to use the getRequestForUpdate() object. Is there any freely available tutorial about this?


It is pretty straight forward.

For Android:

getRequestForUpdate basically used ti update a record in Salesforce using rest API. It has following parameter in order:

  • String (API Version) Ex: 30.0
  • String (SobjectType) Ex: Account or Custom_Object__c
  • String (Record Id) Ex: 0010000000eWerTIAA
  • Map (Field API Name, Field Value) Ex: {Name => Regal}

Returns a RestRequest class's Object

Sample Example:

RestRequest restRequest = RestRequest.getRequestForUpdate(getString(R.string.api_version), "Account", "0010000000eWerTIAA", fieldMap);

    restClient.sendAsync(restRequest, new AsyncRequestCallback() { 
        @Override public void onSuccess(RestRequest request, RestResponse result) { 
             try { 
                    // Play with result object returned of type RestResponse
                    // .. DO MORE
                 } catch (Exception e) { 

This link would help: http://www.salesforce.com/docs/en/mobile_sdk/Content/android_native_tut_detail_page_6.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.