Close spModal - Service Portal

kurtbell1
Giga Expert

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?

find_real_file.png

9 REPLIES 9

Same here

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:

 

I get this when I try your method  find_real_file.png

Strike that.  I had to use $scope.$parent  ($scope.$parent.buttonClicked($scope.$parent.options.buttons[0]);)

Sorry about that. That was definitely a typo.