In Agent workspace,g_modal.showfields we use .then and give code to execute if the user clicks OK button , Can you help me what function we need to use to give the code when the user clicks Cancel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 10:50 AM
In Agent workspace,g_modal.showfields we use .then and give code to execute if the user clicks OK button , Can you help me what function we need to use to give the code when the user clicks Cancel
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 10:18 PM
You can refer to this blog for all the information related to g_modal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 10:24 PM
Hi,
you can refer many OOB UI actions for this and check how they use it
Sharing good link for your help
it uses the .then function
g_modal.showFields({
title: "Choices for Change Request",
fields: fields,
size: 'lg'
}).then(function(fieldValues) {
// this code will run when OK is clicked
});
Few OOB UI Actions
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 10:41 PM
Thank you for the reply!
I used .then function in my code for executing if the user clicks OK.
My question is if the user clicks on Cancel i need to reload the form . I am not able to find which function to use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 10:54 PM
Hi,
check this link if it helps for cancel button
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader