3

Is there a way to query the account history using php and the API? I have some accounts that got updated unnecessarily and I need to view the history to programmatically update them all back to their correct stage. Any help is appreciated. Thanks!

1 Answer 1

8

Yes, every object with history tracking enabled has queryable shadow object. In this case it's simply AccountHistory.

Just experiment with query similar to this

SELECT AccountId, Account.Name, CreatedBy.Name,CreatedDate,Field, OldValue,NewValue 
FROM AccountHistory
ORDER BY AccountId, CreatedDate DESC

You must log in to answer this question.

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