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
Matthew VanderMeer 10Matthew VanderMeer 10 

No such column 'NameSpace__Geolocation__c' on entity 'Account'.

I cannot deploy version 3.156 of my managed package.  I am able to deploy a lower version (3.155) and then deploy 3.156 without issue.  When I deploy the most updated version I get the following error.

1. Dependent class is invalid and needs recompilation:
Class NameSpace.tLP_EmailNotificationList_Functions :
AND DISTANCE(NameSpace__Geolocation__c, GEOLOCATION(:lat
^
ERROR at Row:2:Column:45
No such column 'NameSpace__Geolocation__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
tLP_EmailNotificationList_Trigger: Dependent class is invalid and needs recompilation:
Class NameSpace.tLP_EmailNotificationList_Functions :
AND DISTANCE(NameSpace__Geolocation__c, GEOLOCATION(:lat


However the field 'NameSpace__Geolocation__c' has existed in the managed package since the earliest version (1.4) so I know that the field exists. As well I was able to create this package and subsequent packages and all test cases have passed with sufficient code coverage. I can't understand why installing 3.155 and then 3.156 works without issue but installing 3.156 fails with the above error.

Has anyone else encountered this problem?  Did you find a work around?  This is causing us some pretty major difficulties.
Best Answer chosen by Matthew VanderMeer 10
Raj VakatiRaj Vakati
Check the API Vestion of the old package apex classes. Your GEOLOCATION Fields are not available with the Apex class old version 

All Answers

Raj VakatiRaj Vakati
Check the API Vestion of the old package apex classes. Your GEOLOCATION Fields are not available with the Apex class old version 
This was selected as the best answer
Matthew VanderMeer 10Matthew VanderMeer 10
Thank you Raj, we are reviewing our entire package trying to determine what classes are touching the class causing the error.  This appears to be a complile error when we install the package since all the tests work in the managed package org.  Do you know what the minimum API version needs to be for all our classes to be able to access geolocation?
Raj VakatiRaj Vakati
Try version 33.0 or above
Matthew VanderMeer 10Matthew VanderMeer 10
Thanks Raj,

It took us awhile to find all the pages that referenced this particular class / trigger.  We now have our entire package up to version 33 or later and now our package installs correctly.  You were a lifesaver!