Skip to main content
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.
1 件の回答
  1. 2016年11月21日 17:33
    Hi,

    This is a known limitation of workbench, if you interested in executing the query you can try executing it in developer console. Developer console will be able to process your query correctly.

    Hope it helps.

     
0/9000