- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 02:37 AM
Hello,
I have a function in the 'Link Funciton' section of a widget that I would like to call from the Client Script controller.
The Link function is simply a timer function like so:
scope.stopScroll = function () {
if (angular.isDefined(timer)) {
$interval.cancel(timer);
}
}
I have a recordWatch on the Client Script:
spUtil.recordWatch($scope, 'sys_journal_field', 'name=sn_customerservice_case', function (name, data) {
// would like to call the stopScroll function here
c.server.refresh();
});
So if a record is updated, the stopScroll() function is called.
Many thanks
Snake!
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 02:42 AM
Hi,
spUtil.recordWatch($scope, 'sys_journal_field', 'name=sn_customerservice_case', function (name, data) {
$scope.stopScroll();//this is not working?
c.server.refresh();
});
This way its not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 02:42 AM
Hi,
spUtil.recordWatch($scope, 'sys_journal_field', 'name=sn_customerservice_case', function (name, data) {
$scope.stopScroll();//this is not working?
c.server.refresh();
});
This way its not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 02:48 AM
AAGGHH! I tried this (and many other things) prior to typing out the post because this seemed the right way but it didn't work at the time! Just did it again and it works ha ha.
Great thanks for replying Sunil!