- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 01:44 AM
Hello All,
We have an requirement, when user opens an VMS form and click on FOLLOW button , then the user should be added to the watchlist of that VMS.
But we are not able to find the UI action for that Follow button because its OOB.
So I created on Custom button name as "Custom Follow" and written a "On Load" client script for hiding the follow button. Script as below. when I execute the script both "Follow" & I created "Custom Follow" both are getting disappearing.
Could someone please let me know how can we achieve this functionalities?
Note : VMS table parent table is Task Table
Client Script for hiding the follow button:
Any help will be appreciated
Thanks
Aaakhil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 01:55 AM - edited 07-22-2024 02:19 AM
Any Follow activity is added to the live_group_member table. You don't need to alter the Follow script, instead just create a Business Rule that adds the user to the associated record, the user reference is stored in the stored in the member column. To get the Table it is associated with look at the related record in the live_group_profile table that is stored on that table in the document column. That column is of type Document ID.
Like Reference fields, Document ID fields allow the record to reference another record. However, Document ID fields allow you to reference a record on any table, not just a pre-defined one like Reference fields.
This means that the data is stored in 2 fields: Table Name & Document (sys_id)
Watch this if you are not familiar: https://www.youtube.com/watch?v=FZ_gvKUKFpk
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 01:55 AM - edited 07-22-2024 02:19 AM
Any Follow activity is added to the live_group_member table. You don't need to alter the Follow script, instead just create a Business Rule that adds the user to the associated record, the user reference is stored in the stored in the member column. To get the Table it is associated with look at the related record in the live_group_profile table that is stored on that table in the document column. That column is of type Document ID.
Like Reference fields, Document ID fields allow the record to reference another record. However, Document ID fields allow you to reference a record on any table, not just a pre-defined one like Reference fields.
This means that the data is stored in 2 fields: Table Name & Document (sys_id)
Watch this if you are not familiar: https://www.youtube.com/watch?v=FZ_gvKUKFpk
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 04:09 AM
Hi @Paul Curwen
Thank You so much for your help.
I have created business rule on Live group members table for adding the current logged in user who follows the ticket in to watch list. And I created a notification for them
Appreciated
Thanks a Lot!!
Business rule on "Live Group members" table
On After - insert & update
Script as fallows:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 01:56 AM
Hi @Aakhiil ,
Inactive the OOB UI action for your table. table_name.config search then u will get the ui action name.
or re-write the script to hide button
function onLoad() {
var buttons = document.querySelectorAll('button');
buttons.forEach(function(button) {
if (button.innerText.includes('Follow') && !button.innerText.includes('Custom Follow')) {
button.style.display = 'none';
}
});
}
Thanks
Arun