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
ifasfifasf 

How to determine the oldest EntitySubscription record for a subscriberId?

Due to the limit of 500 followed object per subscriber, I want to automatically remove the oldest EntitySubscription for a User.  Is there a way to figure out which EntitySubscription is the oldest record?  I don't see any date created record in EntitySubscription.

 

Thank you.

rwoollenrwoollen

There's a CreatedDate field.

 

I'm not sure removing the oldest is the right choice here.  It's possible / likely that the oldest is still very relevant (eg maybe they followed their boss when chatter was enabled).