I'm building a custom Notification section, which provides notification or messages to multiple users on any particular object update, I've created a Custom page where I have added a Alert section or notification section, which shows a particular record updates, like there is a custom object lets call it CustomObjA, whenever a record is created or updated with some specific data into that custom object, for that update a message record is generated and which showed on user on the Notification section. now As moment user click or expend the notification section. that notification should be grayed out, means it is seen by that particular user, and next time when that user come to that page it should grayed out those notification which are seen/read by user. So its like our Email read/unread functionality.
how to achieve this functionality.
What I have done so far, I have created a new object called Notification and every time whenever there is any create or update on that custom object (CustomObjA), I wrote a trigger which create a new record in notification object and I'm reading that notification object all the time. On the notification I have created a field called "Status" which include Read/Unread option. Now I want your help to figure out how to set that field as "Read" on basis of every individual user.
P.S. - There are multiple users who sees this notification functionality, so if a UserA seen the message it doesn't mean that UserB also seen that, so userB still able to see that unread mark on the same message in the notification section.
Let me help what's the best way to achieve that.
Thanks in advance!