• System Administrator 537
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0
Trying to query AccountHistory table using the bulk api or workbench. The OldValue and NewValue do not appear in the results, except when you put them at the beginning of the select clause.

1) SOQL where NewValue, OldValue disappear:

SELECT AccountId,CreatedById,CreatedDate,Field,Id,NewValue,OldValue FROM AccountHistory WHERE Field = 'Owner'

2) SOQL that results in duplicate rows, one with Id and other with Name for OldValue, NewValue, column headers are Unknown_Field__1 and Unknown_Field__2 instead of NewValue and OldValue:

SELECT NewValue,OldValue, AccountId,CreatedById,CreatedDate,Field,Id FROM AccountHistory WHERE Field = 'Owner'

The values do not disappear when using developer console, but I still get duplicate rows as mentiond above.