title: Android: Salesforce -cannot upsert data into object
body: <p>Hi Iam facing a hard time inserting data into salesforce objects , from my android app i want to insert data into a Sobject, implementing as below:</p>
  
  <pre><code>private void sendOrderRequest() throws UnsupportedEncodingException {
          final String externalIdField = "OrderExtID__c";
          final String externalId = "123";
          final String accountType = SalesforceSDKManager.getInstance().getAccountType();
          final LoginOptions loginOptions = SalesforceSDKManager.getInstance().getLoginOptions();
  
          new ClientManager(getActivity(), accountType, loginOptions, SalesforceSDKManager.getInstance().shouldLogoutWhenTokenRevoked()).getRestClient(getActivity(), new RestClientCallback() {
  
              @Override
              public void authenticatedRestClient(RestClient client) {
          if (client == null) {
          SalesforceSDKManager.getInstance().logout(getActivity());
          return;
              }
  
  
              // 'client' is a valid rest client.
              RestRequest restRequest = null;
             try {
                 HashMap&lt;String, Object&gt; fields = new HashMap&lt;String, Object&gt;();
                 fields.put(CREATEDBY, createdby.getText().toString());
                 fields.put(CREATEDDATE, createddate.getText().toString());
                 fields.put(ORDERID, orderid.getText().toString());
                 fields.put(PRODUCTID, productid.getText().toString());
                 fields.put(QUANTITY, quantity.getText().toString());
                 fields.put(PRICE, price.getText().toString());
                 fields.put(DESCRIPTION, description.getText().toString());
  
              restRequest = RestRequest.getRequestForUpsert(getString(R.string.api_version), getString(R.string.objecttype),externalIdField,externalId, fields);
          } catch (UnsupportedEncodingException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          } catch (IOException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
           // restRequest = RestRequest.getRequestForDescribeGlobal(getString(R.string.api_version));
  
  
  
              client.sendAsync(restRequest, new AsyncRequestCallback() {
                  @Override
                  public void onSuccess(RestRequest request, RestResponse result) {
                      try {
                          System.out.println("successsss");
  
                          System.out.println("Result..printinf ===="+result.asJSONObject().getJSONArray("sobjects"));
  
  
                          EventsObservable.get().notifyEvent(EventType.RenditionComplete);
  
                      } catch (Exception e) {
                          onError(e);
                      }
                  }
  </code></pre>
  
  <p>i am getting error:404, can someone point me in right direction, the <code>getRequestForUpsert()</code> asks for <code>externalIdfeild</code> and <code>external id</code>, am i passing the request coreect way?..ant help is appreciated</p>