2

I am new in implementing and using the location fields .

Need to know where can I find the Latitude__s and Longitude__s fields? Trying to bring this data from salesforce but cannot find what object they are in. Also how they are implemented and used.

2
  • are you planning to search object/search field metadata to find these types of fields?
    – ipradhansk
    Commented Mar 2, 2016 at 16:25
  • 1
    If you create field with type Location called MyCoords__c, then to get lat/lon you can use MyCoords__Latitude__s and MyCoords__Longitude__s. More info about usage here - developer.salesforce.com/docs/atlas.en-us.200.0.api.meta/api/…
    – kurunve
    Commented Mar 2, 2016 at 16:34

1 Answer 1

2

Important to know is that they are compound fields, part of custom geolocation fields or the address fields.

This is also how you'll find them in the SOAP API:

Address field:

<element name="BillingAddress" nillable="true" minOccurs="0" type="tns:address"/>
<element name="BillingCity" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingCountry" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingCountryCode" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingGeocodeAccuracy" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingLatitude" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="BillingLongitude" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="BillingPostalCode" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingState" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingStateCode" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="BillingStreet" nillable="true" minOccurs="0" type="xsd:string"/>

Custom GeoLocation field:

<element name="sdry__GeoCoordinates__Latitude__s" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="sdry__GeoCoordinates__Longitude__s" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="sdry__GeoCoordinates__c" nillable="true" minOccurs="0" type="tns:location"/>

Rest API returns the same combination of fields.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .