Record watch does nothing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 04:41 AM
Hi Everyone,
So i have a widget that basically queries a table and gets 4 numbers. I wanted display an icon when one of those numbers is updated but the record watch function does not even log when i make a change to one of the records being watched.
client script:
function(spUtil, $scope) {
/* widget controller */
var c = this;
spUtil.
spUtil.recordWatch($scope, 'sn_customerservice_case', '', function(name, data) {
// Returns information about the event that has occurred
console.log(name);
// Returns the data inserted or updated on the table
console.log(data);
spUtil.update($scope);
});
c.getAll = function(){
c.data.action='getAllQueries';
c.server.update().then(function(){
c.data.action = '';
});
};
c.getAll();
}
What im i doing incorrectly?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 05:14 AM
Is there anything in the console log that might be helpful? I see a line that just says "spUtil." right after your var c=this; could there be a syntax error that is stopping the processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 09:53 PM
I removed that line and it still does not work. In the console all i get is >>> init sn_customerservice_case?sys_id!=-1 and then when i update a case nothing.