- edited description
Lookup field to Location SObject not mapped correctly in OST
I’ve started work on a new project where we use the Location SObject extensively, both on the default Asset SObject and on custom SObjects. In the OST a lookup field to the Location SObject is mapped to the type System.Location
, while it should be mapped to Schema.Location
. This is different from the Location
field type, which should be mapped to System.Location
. See also the documentation for both:
System.Location
: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_system_Location.htmSchema.Location
: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm
This results in an incorrect error when filling the lookup with an instance of Schema.Location
for upsert. The error shown here is generated locally, and the code can be deployed, run & tested successfully, so this is not a blocker.
The documentation popup shows the System namespace is used for the type of the Location
lookup field (the LocationId
field is hidden behind the popup):
Comments (4)
-
reporter -
repo owner - changed status to open
Hi. I'm unfortunately not seeing that same behavior:
and:
Can you please confirm that you're on the latest build of IC2 and, if necessary, please rebuild your cache and indices using File | Invalidate Caches?
If you still see the issue after confirming/doing those, can you create a 100% standalone project that reproduces this behavior and attach it here so I can try to reproduce it locally in the same manner that does so for you?
-
reporter Thanks for the reply.
I was away on leave for 2 weeks and after coming back the issue seems to have resolved itself for the project I was working on. As you suggested, rebuilding the cache probably fixed this. I’ll resolve this and if I ever run into this again, I will try to dig a bit deeper to find a cause before opening it back up.
-
reporter - changed status to resolved
- Log in to comment