- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 06:16 AM
Hi guys,
I will be really glad if you help me with my case.
I edited the header of my Service Portal and now in the menu there is a custom tab (dropdown) which shows some information stored in the platform.
I also have a form on one of my pages which can be used from the users in order to create new records.
And the problem is that these new records push data in the same table that stores the information used for my modified tab in the menu.
So when the user adds a new record via the form, the platform doesn't refresh. The record is saved in the table but the information in the tab is not updated in real-time.
I have read about Record Watch tool and I have used it once but when I try now, it doesn't work.
I have this piece of code (in the Client Script part of the widget) that runs when the user clicks on the menu:
$scope.openPrograms = function(state) {
//....some code here....
}
I have tried to add this function:
spUtil.recordWatch($scope, "<name of the table>", "active=true", function(<parameters>) {
});
But how to combine these two functions in one?
And can somebody tell me more about the parameters that I have to use or do I even have to use them?
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 06:29 AM
Are you using custom code for this?
If you utilize the service portal header menu feature, you could use a scripted list for this.
Take a look a the default menu"SP Header Menu" and the "Requests" menu item from the out of the box "sp" portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 06:29 AM
Are you using custom code for this?
If you utilize the service portal header menu feature, you could use a scripted list for this.
Take a look a the default menu"SP Header Menu" and the "Requests" menu item from the out of the box "sp" portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2024 02:33 PM - edited ‎10-25-2024 02:34 PM
To update your custom tab in real-time, combine the `openPrograms` function with `spUtil.recordWatch`. Start watching the table for changes when the menu is clicked. In the callback, refresh the tab's data to reflect new records. Replace Generator Czcionek with your actual table name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2024 12:50 PM
To refresh your custom tab in real-time, set up `spUtil.recordWatch` to monitor changes in your table. This will automatically trigger the function that updates your dropdown whenever a new record is added, ensuring your menu displays the latest data without requiring a manual refresh.