+ Start a Discussion
jjvdevjjvdev 

Why the duplicate lead history values?

Why does this result in duplicate values for a single owner change event?
select Id, CreatedDate, Field, LeadId, NewValue, OldValue 
from LeadHistory
where (field = 'ownerAssignment' or field = 'Owner')
The lead history object has one record where the newvalue/oldvalue is the actual owner/ namequeue name, and then a duplicate record with the exact same CreatedDate time stamp that shows newvalue/oldvalue as the owner id/queue id.

What is going on here?  Why does lead history have 2 records for the exact same event?

User-added image
Andy BoettcherAndy Boettcher
I'm assuming you have some workflows or the Lead Assignemtn rules may be kicking in here.
jjvdevjjvdev
Row 1 and 2 is a single lead assignment rule running (field = ownerAssignment), the owner value was only changed once, however 2 lead history records were created.  One record's NewValue is the queue name, and the other NewValue is the queue id.  Whats odd is the UI only shows a single Lead History change, so why does the LeadHistory object contain 2 records for the same event?
joseph keuler 1joseph keuler 1
Is that the full precision of the created date?  Perhaps there are some milliseconds between the two trasnactions?  Also, do two records appears in the object without criteria? 
SJTTSJTT
have you found out the answer to this? I am having the similar scenario. For changes to the Owner field there are 2 entries in the Lead History. One with 18 digit Id and one with User Name.