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
Options
- 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:
- Labels:
-
Agent Workspace
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2022 10:13 AM
My colleague found a way to reload the form when the user clicks on "cancel" or "X".
You just need to add this piece of code to your .then section:
g_modal.showFields({ title: "Complétez les champs obligatoires pour poursuivre", fields: fields, size: 'lg' }).then( function(fieldValues) { g_form.setValue('close_code', fieldValues.updatedFields[0].value); g_form.setValue('close_notes', fieldValues.updatedFields[1].value); g_form.save(); }, function(error) { location.reload(); });
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2024 03:26 AM