g_model callback function is not returning the results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 07:20 AM
Hi Everyone,
I am seeking help with a challenge I'm facing while trying to make a custom UI action available on Workspace. I attempted to use g_modal for displaying the UI page.
The issue arises with the callback function—it consistently returns false, making it impossible to determine which option the user selected (Cancel or Submit). Knowing the selected option is crucial for triggering an info message and displaying it to the user in the Workspace view. Since I’m unable to read the response, I’m unable to proceed further.
Here’s the code snippet I’m currently using:
function onClick(g_form) {
g_modal.showFrame({
url: 'ABCD.do?' + 'sysparm_id=' + g_form.getUniqueValue() + '&sysparm_num=' + g_form.getValue('number') + "&sysparm_workspace=" + true,
title: 'Engage With ABCD',
//size: 'fw'
height: 500,
width: 1000,
//callback: callingfunction ->Not working
}).then(function(response) { -> Not working
alert(response); -> Always return false.
});
//function callingfunction(){
//g_form.addInfoMessage('Notification triggered to ABCD');
//}
}
I want to basically show info message if a user click on submit in the ui page and once the UI page is closed I need the info message to be displayed to user.
Please assist
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 07:38 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 06:16 AM - edited 11-27-2024 06:17 AM
in Workspace I am using the same code just with g_modal.showFields
so the I guess the g_modal.showFrame has some issues and is not returning the response
- is the URL correct? are you able to execute the constructed URL? perhaps try with a full URL ?
- are there some ACL that might block the URL execution from client side ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:38 AM
Are you able to fix this? I am also facing similar issue