I added a related list declarative action Submit, the button does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
How to add functionality to the button using server script or client script, so that it updates the record state from pending to submitted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
basically you want Related List action which updates State for selected records?
if yes then did you check any OOTB Related List actions how they are doing
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Siris
You can achieve this using a UI Action — that’s the cleanest and recommended way.
Go to System Definition → UI Actions and create a new one on your table.
✔ Check Form button
✔ Set a condition like:
current.state == 'pending'
Then in the Script section (server-side):
gs.addInfoMessage("Record submitted successfully.");
action.setRedirectURL(current);
That’s it 😊
When the button is clicked, it will securely update the record from Pending → Submitted.
If this works, please mark it as helpful and please accept my solution..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@sivasankaris, I want it in workspace list view. A simple serverscript works, but i also want the logic thats used in OOB UI action also in the workspace. The condition part fails as of now.
