Closing spModal window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 09:36 AM
Hi Experts, I have a modal window in my SP Widget that I'm trying to close or dismiss onSubmit, but can't seem to get it to work.
What do I need to add to the below code in order for the modal window to close upon pressing the submit button?
c.onWidget = function(widgetId, request){
spModal.open({
title: 'Check-in',
widget: widgetId,
buttons: [],
widgetInput: {table: 'x_138031_myTable',
sys_id: request.id,
}
}).then(function(){
console.log('widget dismissed');
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 03:14 PM
This post should help:
Oops copied wrong link. the post was made by him. Here's is the real link:
https://community.servicenow.com/thread/260164#1120053
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2017 03:21 PM
The original post didn't come through in Chris's reply. You can find the details of it here in this post (see the 8th paragraph):
https://www.cernasolutions.com/portal-pet-adoption-thoughts-modals/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2017 05:40 AM
Instead of buttons: [] use below code:
buttons: [
{label:'Cancel', cancel: true},
{label:'Submit', primary: true}
]