Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:50:01+00:00 2026-06-15T20:50:01+00:00

I am inserting object into salesforce using REST API. I have one field with

  • 0

I am inserting object into salesforce using REST API. I have one field with Geolocation data-type.
How can inset value to this field using java? My example code is below.

parishud.put(“gps__c”,?????);

there are two fields to insert(gps(Latitude) gps(Longitude)) but in API i found only one field with name gps__c

  HttpClient client = new httpclient.HttpClient();
  JSONObject parishud = new JSONObject();
  try {
      parishud.put("Name","ParishudhTest4");
      parishud.put("entitled__c","Yes");

      parishud.put("Comments__c","Comments");
      parishud.put("fallill_count_after__c","5");
      parishud.put("fallill_count_before__c","7");
      parishud.put("influencedcount__c","8");
      parishud.put("toiletusaseperday__c","3");
      parishud.put("parishudhid__c","002");
      parishud.put("Received_NBA_Incentive__c","Yes");
      parishud.put("Received_NREGA_Incentive__c","Yes");

      //parishud.put("gps__c",?????);


    PostMethod postaccount = new PostMethod("https://ap1.salesforce.com/services/data/v20.0/sobjects/Parishudh__c/");
    postaccount.setRequestHeader("Authorization", "OAuth " + accessToken);
    postaccount.setRequestEntity(new StringRequestEntity(parishud.toString(),"application/json", null));
    client.executeMethod(postaccount);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:50:02+00:00Added an answer on June 15, 2026 at 8:50 pm

    The Geolocation field is actually composed out of 3 fields, 2 of which are accessible for us.

    If your field name is gps then you can store your data in gps__Latitude__s and gps__Longitude__s (note the double underscore in the beginning like it’s a managed package and the ending is “s”, not “c”).

    Make sure you have set profile-level security for your Java integration user to be able to access this field.

    If you need code samples – you can check my answer How do I integrate Salesforce with Google Maps? or for example http://blog.internetcreations.com/2012/09/creating-a-geolocation-trigger-in-salesforce-winter-13/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come a across a few different methods for inserting data into SQL
so I'm inserting an <input type=file> object into a fairly small table....everything works fine,
When using the Salesforce Partner API (version 21.0), how can I determine if the
i have a class where i am inserting data into a array-list based on
How can i avoid duplicate data when inserting from CSV file into my SQL
In our production org, we have a system of uploading sales data into Salesforce
For example, there are 5 object stores. I am thinking of inserting documents into
I'm inserting documents using node mongodb native driver into a mongodb (sic!). My objects
Inserting rows one by one from a 600 record data-set is taking almost an
When inserting an object into a database with SQLAlchemy, all it's properties that correspond

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.