'Expected type [SObject, List<SObject>]; found Location' when attempting to perform DML on Schema.Location

Issue #1795 duplicate
Raihan Navroze created an issue

How to reproduce:

Schema.Location loc = new Schema.Location();
insert loc;

Expected behaviour:

There should be no error under insert loc;

Actual behaviour:

I think it’s simply confusing Schema.Location for System.Location.

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm

Comments (1)

  1. Log in to comment