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
yesterday
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
yesterday
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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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..

