- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 09:32 PM
I have one ui action called "Copy Story" which make a copy of exiting story, now i want user consent to say yes then it should copy. if they says no, dont do anything.
I tried like below but not working.
function callMe(){
var conf = confirm('Are you sure?');
if(conf)
gsftSubmit(null, g_form.getFormElement(), 'sysverb_copy_story');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 09:35 PM
Hi @Prakash_S ,
Try doing like below.
function callMe(){
var conf = confirm('Are you sure?');
if(conf)
gsftSubmit(null, g_form.getFormElement(), 'sysverb_copy_story');
}
if(typeof window == 'undefined')
runServerSideCode();
function runServerSideCode(){
//your server side code goes here
}
Also make sure below.
- Client checkbox has been checked.
- You have used correct form action name "sysverb_copy_story".
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 09:35 PM
Hi @Prakash_S ,
Try doing like below.
function callMe(){
var conf = confirm('Are you sure?');
if(conf)
gsftSubmit(null, g_form.getFormElement(), 'sysverb_copy_story');
}
if(typeof window == 'undefined')
runServerSideCode();
function runServerSideCode(){
//your server side code goes here
}
Also make sure below.
- Client checkbox has been checked.
- You have used correct form action name "sysverb_copy_story".
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 10:08 PM
It got resolved @Runjay Patel , Thanks for your prompt reply.
UI Action name was incorrect after changing it to "sysverb_copy_story2" it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2024 10:01 PM
please share your existing UI action code to help you better
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader