+ Start a Discussion

Get records that were replaced in picklist?



I'm working with a custom object here.

One of the fields is of the "picklist" type and I have some values in it.  I replaced ONE of the values by using the "replace" functionality on the picklist.  I now need to find those records that were replaced.  I should have maybe exported them via Data Loader first so I would have a backup, lesson learned, but is there a way to determine the records that were affected?

in the "View Setup Audit Trail" section I can see the log entry for when I replaced the values and the exact time the records were replaced, but I'm not sure if there is a way to query to flag those records?  From what I can tell the "last modified column" doesn't change when you replace a picklsit value, but I'm not 100% sure. 


Any help highly appreciated, I'm hoping there is a way??




It sound not too complicated.

Find all the records that currently have the new value, and they created before the date you made the change.


SELECT id, name
FROM objectName
WHERE createdDate < [dateOfThisChange]
AND picklistField = [newValue]