How to call script include in business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 10:28 PM
How to call script include in the business rule to trigger the notification to users. Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 11:28 PM
Hi chsumit,
What you meant by by parameters from the script. like below
var x= current.vendor_contact.email.toString();
var obj = new ScriptIncludeName().functionName(current);
gs.eventqueue("event_name(used in notification)",current, x ,"");
Regards,
Sruthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 11:32 PM
Sruthi,
Can you please check the script actions where you can add the event and run the script as well.
https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/platform-events/reference/r_ScriptActions.html
Hope it will help you.
Thanks,
Sumit Sirohi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2022 11:33 PM
Hi
If it is a client callable Script include you have to use the below syntax-
gs.include("ScriptIncludeName");
If it is not an Client Callable Script include Use the below syntax -
var ObjectName = new ScriptIncludeName().FunctionName();
Hope it will help you:)
Cheers..!
Tushar
Cheers..!
Happy Learning:)
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 10:19 AM
Hi
To trigger notifications there is no need of script include, instead you can make use of "events"
So, to know how to create notification using business rule follow this link.
I hope it helps you, if so then please mark my response as both helpful and correct.