- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2022 04:40 AM
Hi,
I have a requirement where i have to take the user to a record producer (name XYZ) when he clicks on the related link "Create Request" in interaction form and set the status to "close" of the interaction and copy the interaction description to request description.
Below is the script i have written in Create Request, and it is taking to the record producer but it is not copying the short description and status of interaction to close.
onClick: OpenReq()
Script:
function OpenReq()
{
var url= 'com.glideapp.servicecatalog_cat_item_view.do?v=2323230930380832';
g_navigation.openPopup(url);
current.state='closed_complete';
current.update();
}
This UI Action is on interaction form. The state is not copied and how to copy the interaction description to request decription.Kindly, help me in this regard.
Thanks!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2022 01:27 AM
Hello,
I found the solution for state not getting closed.
After the code for opening the request url i call the fom element and used it to call another function and in that set the state to closed.
It is working fine. Below is the screenshot for reference:
Thanks for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2022 12:46 AM
Hi,
Do GlideAjax and update the interaction as Closed and then use g_navigation to open the catalog item
You can send multiple values in url
var url= 'com.glideapp.servicecatalog_cat_item_view.do?v=2323230930380832&sysparm_description=' + g_form.getValue('description') + '&sysparm_priority=' + g_form.getValue('priority');
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
‎08-28-2022 09:33 PM
@SK
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
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
‎08-28-2022 10:11 PM
Hi,
GlideAjax in UI Action?
Is there any shorter way to make it close?...Will have to write script include and glideajax otherwise just to make it close.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2022 10:24 PM
Hi,
you can use GlideRecord in client side UI action but it's not recommended; hence GlideAjax
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
‎08-28-2022 10:32 PM
How can i use GlideAjax? Please guide. If i am putting anything above g_navigation, then the UI Action is not working at all.