Close spModal - Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2017 02:25 PM
I am opening a widget within the spModal class provided in Service Portal - but am wondering how do I close the Modal I've opened once I've done what I came to do in the embedded widget? This seems like it should be easy but I cant work it out. Here is the code I'm using to Open it. As you can see I've tried in a few places to close it but with no luck.
Are there any other approaches I can try?
- Labels:
-
Service Portal Development
- 11,377 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 11:59 AM
Same here

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 01:00 PM
So, I just got mine figured out.
I wrote this in the HTML of the inner spModal widget:
Then this in the Client script of that inner spModal widget:
Then I altered the constructResponseHandler(response) function to look like this (edits in yellow):
So the buttons[0] it's referring to is of course on the parent spModal widget:
So this button works perfectly now:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 11:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 01:05 PM
Strike that. I had to use $scope.$parent ($scope.$parent.buttonClicked($scope.$parent.options.buttons[0]);)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2018 03:49 PM
Sorry about that. That was definitely a typo.