- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2019 11:36 AM
Hi,
I am learning Service Portal, i have created 2 widgets and added into an page. In the Widget 1 i have a reference type field when i select any record i get the sys id which i want to pass to another widget.
After looking at few articles i came to know this can be done using broadcasting but i am getting struck in implementing, can anyone please share the code if possible
Below is the script i written in Client controller by googling which is getting the sys id in the alert
$scope.location = {
displayValue: c.data.loc.short_description,
value: c.data.loc.sys_id,
name: 'short_description'
};
$scope.$on("field.change", function(evt, parms) {
if (parms.field.name == 'short_description')
c.data.setLocation = parms.newValue;
alert(parms.newValue);
c.server.update().then(function(response) {
spUtil.update($scope);
});
});
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 12:58 AM
Hello,
There is learning plan documentation on this. If both the widgets are in the same page, you can achieve this. Please go through the below link
Regards,
Jagadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2019 11:49 AM
Here is a good example:
https://serviceportal.io/using-events-communicate-widgets/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2019 12:58 AM
Hello,
There is learning plan documentation on this. If both the widgets are in the same page, you can achieve this. Please go through the below link
Regards,
Jagadeesh