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
immaimma 

error : Invalid field Location__Latitude__s ???

Hello everybody , hope you are doing fine
I tried to do the some of this tutorial : https://blog.internetcreations.com/2012/09/creating-a-geolocation-trigger-in-salesforce-winter-13/
but I get an error :  Erreur de compilation : Invalid field Location__Latitude__s for SObject Account à la ligne 4 colonne 15
here is my code :
// Trigger runs getLocation() on Accounts with no Geolocation
  trigger SetGeolocation on Account (after insert, after update) {
         for (Account a : trigger.new)
          if (a.Location__Latitude__s == null)
               LocationCallouts.getLocation(a.id);
   }
I have already created a field name loacation in account
Thank you for your help
best regards
Dushyant SonwarDushyant Sonwar
Hi Imma,
I think it's version issue
See this..
http://salesforce.stackexchange.com/questions/1682/no-such-column-location-c-using-geolocation-field-beta
Hope this Helps
immaimma
yes you are totaly right , thank you for your replay i will see your link .
A lot of thanks
Dushyant SonwarDushyant Sonwar
Imma,
If you created your Geolocation Field 'Location',
try to save your Trigger Salesforce.com Api Version to 26 or below in VersionSettings tab.
 
immaimma
I try your suggestion but I still get the some error
amahmamahm
If somebody still has the problem - i encountered this while try to solve the salesforce trailhead and entering geolocation coordinates for a contact - try entering the coordinates/geolocation latitude longitude with a comma instead of a dot : 37.923824 ----> 37,923824