Ui action script doesn´t work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
56m ago
I'm creating a UI action (button) in the ServiceNow sc_task table called "Create Story". The button should trigger a process to create a story record in the rm_story table and copy fields and attachments from the related Requested Item (RITM) to the new story. However, the button isn't working as expected because the script isn't even being called. I need guidance on how to implement the script so that clicking the button starts the flow or executes the necessary actions. We've already tried all approaches and configurations, and since the script isn't running, even looking at the log table is pointless.
The script runs on background scripts interface, so the script is ok. But why on earth he doesn´t run in the UI action is a mystery!
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
52m ago
Hi @Big Alex
Don't lose hope, We can fix this!
Share the script details and screenshot of UI Action to see if you have missed any configuration related details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
25m ago
unless you share script we can't help
what debugging did you do?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
21m ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6m ago
update script as this
// Validar registro atual
if (current.assigned_to != '570743494740765045a1fb72036d431f') {
current.assigned_to = '570743494740765045a1fb72036d431f';
current.update();
gs.addInfoMessage('Atribuido ao usuario padrao com sucesso.');
} else {
gs.addInfoMessage('Registro ja atribuído ou inválido.');
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
