function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
West415West415 

Get records that were replaced in picklist?

Hi,

 

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??

liron169liron169

Hello,

 

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]