Hello Readers,
Welcome back to the Part 3 of this series on creating custom activity type. Just to recap in Part 1 you read about how to get the custom activity type available in your settings page in addition to OOB SharePoint types. In Part 2 you read about how to get feed related to your custom feed type in your colleagues feed as well as in your feed. So functionality wise we have been able to cover everything. But there is one thing still pending and that is what is happening behind the scenes. When I was trying to implement this feature, I was very anxious in knowing where is the data actually going? So, i explored the content db and found out that it modifies the PROFILE DB and SOCIAL DB. The various tables of interest here are
- ActivityPreference : This is the table that acts as a filter. If you remember, when you go to your newsfeed settings page and try to track down all the activities that you are following then by default you will observe that everything is coming selected. If for any user , all the options are selected for following then there will be NO entry created in the ActivityPreference table. It will create an entry only if any user selects some limited options i.e. why a filter.
- ActivityTemplate : As the name suggests, it is the template for our activity type. We define the Activity Template inside a resource file.The ActivityTemplate table contains the list for all the activity types. Below is the screenshot of this table where if you observe, in the ActivityTemplateId we have the unique ID for our CustomActivityType. If you recall , in Part 1, we had created an ActivityTemplate and ActivityType. Try debugging the code and check the value of these id's and then open up this table in your Profile DB and you will see a record gets created here for your custom activity template.
3. ActivityApplication : If you recall, to start with creating a custom activity type, we had first of all created a custom Activity Application. This information gets stored in the ActivityApplication table in the ProfileDB.
4. ActivityType : This table contains the list of all the activity types created. In the table below, if you observe we have our custom Activity Type. If you observe carefully, there is a relation between all these tables that maps one thing to the other like the ActivityTypeId , ApplicationID, ApplicationTemplateId etc.
5. ActivityEventsConsolidated : This table contains all the events that will appear in the colleagues newfeed page.
6. ActivityEventsPublished : This table contains all the events that will appear in the publisher's Recent activities webpart.
So, here I come to the end of the series of the blog posts on custom activity type. I hope that by now you must have got some idea on how to achieve this functionality.
Happy SharePointing !!!!!!
- Geetanjali
No comments:
Post a Comment