Save record in glidemodal window without closing it

Marton2
Kilo Expert

Hi guys,

On agile board we have a list of stories. You can open a story by clicking on a number, which if I'm not mistaken is a glide modal window. We have the same UI actions as on a regular story form, but the save and update buttons here both close the window after saving the changes. Requirement is, the save button should not close the window. After testing the UI action it seems that the 'update' function and the 'setRedirectURL' function both close the window. Is there a way to apply the changes without closing the window? Maybe as a workaround instantly reopening it after? I've tried to look up how this glide modal window is generated, but I couldn't find anything other than the html href with the link to the record, maybe it's not available for development?

Any suggestions are welcome.

Thanks.

1 ACCEPTED SOLUTION

Marton2
Kilo Expert

My colleague found a solution for this:

He created a UI action, and then he updates the record through GlideAjax, that way the window doesn't get closed.

One small problem with this is, that there's no way to differentiate UI actions on regular form, and in Glide Modal window, but the functionality is working in both cases.

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Marton,

So on click of UI action Glide Modal is opened. What it shows?

Can you share screenshot?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

No, on click on the number of the story, the story form is open in the Glide Modal window. The UI action is in this window, the save button, just like on a regular story form. The goal would be to make the save button not close the Glide Modal window.

Hi,

I believe this would happen as that is OOB behavior. the save button would save the record and reload the page; Since this is modal window it might be reloading this as well

Please consider marking answer as Correct & 👍Helpful if you find my response worthy based on the impact.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes, this is the problem, after saving, the Glide Modal window closes. Is there a workaround to  this, maybe reopen the GlideModal window right after? It seems like the method to open this window is editRecord($event,item), upon clicking on the href, but as far as I can tell this is in the backend and there's no access to it, but would this be somehow replicateable?