Field History for owner field contains wrong ID(old id) in NewValue if owner is changed automatically due to parent record owner change
Last updated 2017-10-14 ·Reference W-2856371 ·Reported By 12 users
Summary
When owner automatically changes on child records due to change in parent owner, the field history row for child record contains the incorrect ownerID as new value when fetched using SOQL.
Repro
1. Open any Opportunity record detail page (Or any other child object, eg contact) on UI where status is *NOT* Closed (Closed Opportunities do not get transferred to new Account owner by default-Expected).
2. Open its related parent Account record detail.
3. Change the Account Owner to any other user
4. Now go to Opportunity Detail and notice the Field History Related List.
Correctly shows that Opportunity Owner has been change from user1 to user 2.
Now run the following SOQL on the field history table of the object:
SELECT OldValue,NewValue FROM OpportunityFieldHistory WHERE OpportunityId = '00628000006I5kF'
Notice that the oldValue and New value contain same ownerID. New Value contains wrong ID, which is ID of previous Owner.
Workaround
None
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.