Filter out 'Ids' from Field History models?
When changing a lookup field in Salesforce, 2 instances of FieldHistory objects are created, one that has the Salesforce ID in the Old/New value field, and the other that has the Name of the lookup object that was changed in the Old/New value field.
Is there any way in SKUID to filter out the instances where a Salesforce ID is in the Old/New value field on FieldHistory objects?
List<AccountHistory> ach = [SELECT Id, Account.Name, Field, OldValue, NewValue FROM AccountHistory WHERE Field = 'Owner' ORDER BY CreatedDate DESC]; List<AccountHistory> targetAch = new List<AccountHistory>(); for(AccountHistory ah : ach) if(!(ah.NewValue instanceof Id)) targetAch.add(ah);
How might we be able to go about filtering out these fieldHistory rows that show Salesforce IDs in SKUID?