- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 02:54 AM
Hi all
We've got a requirement for the ServicePortal to show users closed as well as their open incidents & requests.
The list of these comes from a Header Menu scripted list called 'My Calls'
Looking at the code, is it as simple as removing the highlighted text, or something a bit cleverer?
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 06:12 AM
Dont remove
t.record_watchers.push({'table':'incident','filter':'active=true^caller_id=' + u});
t.record_watchers.push({'table':'sc_request','filter':'active=true^requested_for=' + u});
replace them with
t.record_watchers.push({'table':'incident','filter':'caller_id=' + u});
t.record_watchers.push({'table':'sc_request','filter':'requested_for=' + u});
and in places where you have used addActiveQuery(), add an "//" before them

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 03:08 AM
record watchers are used to look for any new change after the page is loaded (to respond to table updates in real-time). You have to update this and as well as, other script which populates these data initially .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 04:44 AM
I'm honestly not sure what you mean. It's the list of records that are displayed as a default. Nothing to do with changes in the page after it is loaded.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 04:50 AM
Can you post the complete code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 05:02 AM
What the record watchers do is described in the comment above "t.record_watchers = []".
Your highlighted code will help the Header menu item keep the correct count that shows how many records meet that criteria.
It watches the records meeting the criteria for any changes and updates the t.items list to keep the count in synch.
The list is made from what is pushed in t.items and that is from the script that is below your highlighted area.
Or at least that how it works OOB. But it does look like below the code is changed and parts are commented out. So, it depends on what the rest of the code is doing.