+ Start a Discussion
Jeff Garbers - PRODJeff Garbers - PROD 

Custom Location field not in test scratch org after push in geolocation project

I'm working through the geolocation app in Trailhead and I ran into a minor problem. The last step in the "Build the Account Map Display" section has you create a new, fresh scratch org ("GeoTestOrg"), push your code into it, import data, and make sure your stuff works properly there. I've followed the instructions carefully (I think) but I get an error when trying to load the sample data:
ERROR:  No such column 'Location__Latitude__s' on sobject of type Account.
I checked the Account schema in GeoTestOrg using this command, but my Location__c field doesn't appear:
$ sfdx force:schema:sobject:describe -s Account -u GeoTestOrg
Using a similar command for my "working" scratch org, I do see Location__c having been defined (and I see my location markers, etc. properly when I run from there):
$ sfdx force:schema:sobject:describe -s Account
So it seems as if the Location__c custom field on Account isn't getting pushed to GeoTestOrg. From the Developer Console on GeoTestOrg I do see that my components and other files (AccountList, AccountMap, etc.) are there, so something got pushed successfully.

I tried the create / push / check steps again with another new scratch org and got the same result -- no new Location__c field on Account. Anybody have any idea what I might be doing wrong, or what I can do to investigate? Thanks in advance for any help!

 
Sunita PSunita P
Hi Jeff,

Were you able to resolve this issue? I'm getting the same error while working on the SFDX trailhead module.

Thanks,

Sunita
Sunita PSunita P
Hi Jeff,

The issue was with the field level security for the Location__c field, set the visibility in the scratch org from the UI and then executed the CLI command to import/upload the data into the scratch org.

Thanks,

Sunita