Model dialog when flagging incident as knowledge article
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 01:21 AM
Hi All,
We have the requirement to show a modal dialog where user can select the Knowledge base, this dialog should only pop-up when the user has selected the Knowledge checkbox on the incident form and resolves the incident.
so far we have the popup showing but the biggest issue is that the record does not save the incident so the incident does not get saved. The client script runs onSubmit which happens before the record is saved and so when we close the modal dialog it does not save the ticket. If we use g_form.submit(); or g_form.save() in the client script this will create a loop because now the form is being submitted again so then the client script will get called again over and over.
onChange client script did not work because that will run immediately when the form changes and not on a save of the record.
If we can get the record to save the resolve updates first before it opens the modal that is the only way that it could work but right now I don't have an answer how to do this on the client side.
i added screenshot of the client scripts and ui page, hope anyone can help