-
-
Save wave-inguane/8c38bd4ba55f07b528cf7eb1e3f3c3a2 to your computer and use it in GitHub Desktop.
spUtil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A simple recordWatch function. | |
spUtil.recordWatch($scope, "live_profile", "sys_id=" + liveProfileId); | |
//In a widget client script | |
function(spUtil, $scope) { | |
/* widget controller */ | |
var c =this; | |
// Registers a listener on the incident table with the filter active=true, | |
// meaning that whenever something changes on that table with that filter, | |
// the callback function is executed. | |
// The callback function takes a single parameter 'response', which contains | |
// the property 'data'. The 'data' property contains information about the changed record. | |
spUtil.recordWatch($scope, "incident", "active=true", function(response) { | |
// Returns the data inserted or updated on the table | |
console.log(response.data); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment