Record watch does nothing

mostafak
Giga Contributor

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 

 

 

2 REPLIES 2

Chuck Tomasi
Tera Patron

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.

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.