function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Please , help me , i can't save new object from android in salesforce

i'm trying  to develop android application with integration to salesforce. i downloaded salesforcesdk.jar library . i managed to retrieve some values from salesforce but i failed to save  values  that user fills in . i'm trying to insert it to follow_up_training_dog__c the only required field in this object is :

Dog Name

Edit | Del Dog_Name__cMaster-Detail(כלב) Required Filtered Lookup רפי טגליכט, 18/10/2011 11:24


it's master detail and  related to Dogs__c table


my code looks like this:

    JSONObject data = new JSONObject();
            data.put("assessment_acomp__c", mSelectionAccomponyAreaName);
            data.put("Walk_area__c", mSelectionWalkAreaName);
            data.put("Dog_Name__c", mSelectionDogName);
        }catch (JSONException e){


SFRestAPI api = SFRestAPI.getApi();
    _handlersClass = handlers;
    _model = Singeltone.getInstance();
        api.send(_model.getApplicationContenxt(),_model.getToken(), api.requestForCreateWithObjectType("follow_up_training_dog__c", data), this, null);
    } catch (SFRestException e) {

i tried to execute this request in

and it succeeded .

in the body i wrote



i got "bad api request " error

please help , i have no idea what to do?


these are the properties of relation

Custom Field Definition Detail  
Field Information
Field LabelDog NameObject Nameמעקב אחר כלב באימון
Field NameDog_NameData TypeMaster-Detail
API NameDog_Name__c  
Help Text 
Created ByAdmin Admin, 08/08/2011 23:15Modified Byרפי טגליכט, 18/10/2011 11:24
Master-Detail Options
Related ToכלבChild Relationship NameFollow_Up_Training_Dogs
Related List Labelמעקב אחר כלבים באימון
Sharing SettingRead/Write. Allows users with at least Read/Write access to the Master record to create, edit, or delete related Detail records.
Lookup Filter
Filter Criteria
Dog Name: dog's statusEQUALSdog assessed for training, dog assessed for breeding stock, dog in further assessment, dog in training
Filter TypeRequired. The user-entered value must match filter criteria.
Error MessageValue does not exist or does not match filter criteria.
Lookup Window Text 




Dirk GronertDirk Gronert

Pls have a look into our Salesforce Android SDK at ! There is the source code of the sdk and also a sample app (CloudTunes) ... You should use the RestClient with the RestRequest ...


Dirk GronertDirk Gronert

There is alos a template project to start ...