You need to sign in to do that
Don't have an account?
Need help to identigy each particular user Entity subscription count???
Req: I have no.of users in my instance and no.of entity subscriptions in my instance. Have to identify each individual users no.of entity subscription based on that want to delete some entity subscriptions of that user. Have to write code by avoiding governor limits can any one help me on this
Step 1: List of users (No.of user in instance eg: 30 to 40 users)
Step 2: List on Entity subscriptions (Have to identify which user created how many Entity subscriptions)
Step 3: If particular user E.S count > 490 want to delete first 25 E.S of that user.
I written code but its crossing governor limits. Can any one help me on this ASAP. Thanks in advance
I've taken logic from your code and ported it to something that is safer in bulk. Based off what I've seen in the metadata to query the entitysubscriptions off the User the child table is called FeedSubscriptions:
Hi Sean ,
Can u please tell us how did you saw feedsubscription object in Metadata, When I look at the Salesforfce ERD's I do not come across this object ?
Thanks
I used Force.com explorer to look up the metadata schema:
http://wiki.developerforce.com/page/ForceExplorer
Hi sean,
I know I am not as good as you are .However,I do not understand how u have come to the conclusion that feed subscription has some role to play in this when the person who has posted this does not even talk about it in his code.
Anyway,I must be missing something here?
His code was focused on the EntitySubscription, based off what I read up in the API doc it related back to chatter follows. From there I simply tried it out by using a test org and added a chatter follow, then used Force.com Explorer to find a way to query that record straight from the User object.