Skip to main content

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?


Doing a search online finds a way to do this in APEX, basically identifying if the field is an instance of a Salesforce ID but we can’t utilize these tools in SKUID (or is there a way to do that with javascript perhaps?).


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?


Thanks!

Hey @Mark_L !


I’m asking the team now. I will get back to you as soon as I get a response.


Thanks!


Reply