Need to call script include in condition box in action assignment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 11:27 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 11:40 PM
Hi @shrngikaG
Script Condition (Server-Side): The server-side condition is evaluated next. If it returns false, the action will not be displayed, regardless of the client or record conditions.
You can use following approch to call script include in it:
new ScriptIncludeName.MethodName(paramenters)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 12:04 AM
it's like normal UI action condition field
You can use server side syntax
new ScriptInclude().functionName()
What's your issue?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 12:24 AM
Hi @shrngikaG
Please see below solution.
Once you have your Script Include set up with the new method, you can call it in the condition field of your UI Action like this: new conditions_hidestudbutton(). shouldDisplayButton(); This line will instantiate your conditions_hidestudbutton class and call the shouldDisplayButton method.
If above solution is helpful for your, Please mark as helpful and accept the solution.
Thanks
Anshul