- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2024 05:09 AM
Hello All,
I have a widget where it is displaying cases.
What I want is that whenever a case is updated from platform/backend, the update should be reflected in the list.
I'm using spUtil.recordWatch and it is giving the updates in console, but I'm not sure how to reflect those updates in the portal widget list.
Below is the details:
HTML:
<tbody>
<tr ng-repeat="item in data.list track by item.sys_id">
<td role="{{$first ? 'rowheader' : 'cell'}}" class="pointer sp-list-cell" ng-class="{selected: item.selected}" ng-click="go(item.targetTable, item)" ng-repeat="field in ::data.fields_array" data-field="{{::field}}" data-th="{{::data.column_labels[field]}}"><a href="javascript:void(0)" ng-if="$first" aria-label="${Open record}: {{::item[field].display_value}}">{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</a><span ng-if="!$first">{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span>
</td>
</tr>
</tbody>
Client Controller:
spUtil.recordWatch($scope, 'sn_customerservice_case', "active=true");
c.update = function update() {
c.server.update();
}
As you can see in the above screenshot, I'm getting the updated short description in the console, but same is not updating in the widget list.
Please Help.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2024 08:28 AM
Hi @Hardik Panchal ,
Try something like this, this will get latest data from server and update the client data to reflect the real time changes.
spUtil.recordWatch($scope, 'sn_customerservice_case', "active=true", function(name) {
$scope.server.get().then(function(response) {
c.data = response.data; // map client data to the updated server data
});
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2024 08:28 AM
Hi @Hardik Panchal ,
Try something like this, this will get latest data from server and update the client data to reflect the real time changes.
spUtil.recordWatch($scope, 'sn_customerservice_case', "active=true", function(name) {
$scope.server.get().then(function(response) {
c.data = response.data; // map client data to the updated server data
});
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2024 08:55 AM
Thank you for answer. it help me to fix a little problem in my widget.