1

When I try this SOQL query in Developer Console:

SELECT ParentId, FieldHistoryType, Field, Id, NewValue, OldValue FROM FieldHistoryArchive LIMIT 10

I get this error:

sObject type 'FieldHistoryArchive' is not supported.

5
  • 1
    does your user have “Retain Field History” permission ? Jun 20, 2017 at 9:54
  • Admin. It seems I don't have the right edition of Saleforce. Jun 20, 2017 at 9:56
  • What edition are you using? Only the following editions support BigObject: Enterprise, Performance, Unlimited, and Developer.
    – Adrian Larson
    Jun 20, 2017 at 13:49
  • Yeah, I know, I have the professional. Jun 20, 2017 at 17:35
  • @AdrianLarson Do you want to post the answer? Seems to be that it wasn't from a supported edition. Jun 25, 2017 at 22:22

2 Answers 2

1

Only the following editions support BigObject: Enterprise, Performance, Unlimited, and Developer. If you are using an edition other than these (such as Professional) you won't be able to use FieldHistoryArchive.

1

In addition to @adrianlarson answer, the following appears to be true as of V50 (Winter 21)

sObject type 'FieldHistoryArchive' is not supported.

will occur in any testmethod where the running user does not have View All Data permissions. That is:

System.runAs(someUserWithoutViewAllDataPermission) {
   FieldHistoryArchive[] fhas = SELECT Id FROM FieldHistoryArchive Limit 1]
    ... // will fail with sObject type 'FieldHistoryArchive' is not supported.
}

The error does not occur in a non-test context, regardless of running user's permissions (provided you aren't enforcing CRUD on the object before querying)

FieldHistoryArchive[] fhas = SELECT Id FROM FieldHistoryArchive Limit 1]  // works

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .