Thursday, 7 July 2011

Chatter data Model and objects.

Hai friends , i have explored on the chatter,especially on chatter data model and displaying chatter feeds on Vfpage ,sending comments to feeds from Vfpage.
first i will explain about the chatter objects and chatter data model.
              Feed item is the Basic entity in the chatter,information about the each chatter feed(post) like created date,created by,body,....are stored as Feed item in chatter.Here Feed items are different types  ,they are 
                                   User Profile feed
                                   Entity feed
                                   News Feed
                                   Collaboration Group Feed.
Entity Feed :- In Chatter to follow data ,we need  to enable feed tracking for the desired object and we can specify the fields to know updations for that fields.
 Set up--> App Setup--> customize-->Chatter-->Enable feed tracking.
There you can select object and fields also.(Note you can follow only 20 fields for an object.)
Let us consider you have selected Account object,then entity feeds for that object are stored in Accountfeed(chatter automatically created this).if you want to see all the feeds related to account object you can query data from that records,


Example:-
SELECT Body, Type, Title, CreatedBy.Name
 FROM AccountFeed WHERE ParentId = <Account Record Id>

 in the case of custom object

SELECT Body, Type, Title, CreatedBy.Name
 FROM Employee__Feed WHERE ParentId = < Employee Record Id>
   When you update the record then the updates are stored in to FeedTrackedChanges.this contains both  old and new value of the field for a particular record.We can not query directly from Feed tracked changes,
you can query like,


Example:-
  SELECT Id, (SELECT Id, FieldName, OldValue, NewValue FROM                        
  FeedTrackedChanges ) FROM AccountFeed.                     


NewsFeed:-  Newsfeed forms a sort of aggregate of posts of all users, groups, objects that a particular user following. Which hold all the posts, you can see on user home tab.


Example:-
   SELECT Id, Type, Body, Title, CreatedBy.Name FROM Newsfeed


User Profile feed:-User Profile feed like Newsfeed but it is specific to a particular user.
Example:-
  SELECT Id, Type, Body, Title, CreatedBy.Name FROM UserProfileFeed WITH UserId = <User Id>     
 Collaboration Group feed:- It represents chatter feed for a specific chatter group (private/public).
Example:-
SELECT Id, Type, Body, CreatedBy.Name FROM CollaborationGroupFeed where parentId = <GroupId>
Feed Comment:-
If one user adds a comment to another user post, then a record is created in Feed Comment with reference to feeditemid. We can’t directly query the Feed Comment object, we query from Entity feed.

Example:-
 SELECT Id, (SELECT Id, CommentBody, CreatedDate, CreatedById,
 CreatedBy.FirstName, CreatedBy.LastName
 FROM FeedComments ORDER BY CreatedDate DESC LIMIT 10) 
FROM AccountFeed ORDER BY CreatedDate DESC, Id DESC LIMIT 1


                                                                   chatter Data Model
                              
                              

26 comments:


  1. I was searching for the better blog on Sales force CRM techniques to understand what CRM is and what is the use? Your blog is the right one I found to get depth knowledge. Thanks for sharing your wonderful ideas.
    Regards
    Salesforce Training in Chennai
    Salesforce Training

    ReplyDelete
  2. Excellent blog on Cloud Computing where I can see some unknown facts about cloud computing. Please update your thoughts frequently.
    Cloud Computing Courses | Cloud computing course in Chennai

    ReplyDelete
  3. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Advance Digital Marketing Training in chennai– 100% Job Guarantee
    digital marketing jobs career opportunities in abroad

    ReplyDelete
  4. I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  5. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa training in Chennai | rpa training in pune

    rpa training in tambaram | rpa training in sholinganallur

    rpa training in Chennai | rpa training in velachery

    rpa online training | rpa training in bangalore

    ReplyDelete
  6. I was looking for this certain information for a long time. Thank you and good luck.
    python training in tambaram
    python training in annanagar
    python training in Bangalore

    ReplyDelete
  7. Very well written blog and I always love to read blogs like these because they offer very good information to readers with very less amount of words....thanks for sharing your info with us and keep sharing.
    Microsoft Azure online training
    Selenium online training
    Java online training
    uipath online training
    Python online training

    ReplyDelete
  8. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
    mobile app development training
    mobile application development training online
    web designing course with placement in chennai
    web designing training institute in chennai
    web design and development training
    Web Designing Course Training Institute in Chennai
    mobile app development course
    mobile application development course
    learn mobile application development

    ReplyDelete
  9. I have gone through your article and it motivates me in different way. Thanks for sharing such a wonderful content. web design company in velachery

    ReplyDelete
  10. Thank you for the informative post. It was thoroughly helpful to me. Keep posting more such articles and enlighten us.


    DevOps Training in Hyderabad

    ReplyDelete
  11. Всякий жаждет предугадать собственное будущее и видит конкретные типы гадания максимально достоверными. Гадание на будущее значение это вариант увидеть приближающиеся события непрерывно манил род человеческий. Ворожба дает увидеть, что человека подстерегает в ближайшее время.

    ReplyDelete
  12. <a href="https://www.al-mnarr.com/%d8%b4%d8%b1%d9%83%d9%87-%d9%85%d9%83%d

    ReplyDelete