How to call script include in business rule?

sruthig
Tera Expert

 

How to call script include in the business rule to trigger the notification to users. Please suggest.

 

 

 

 

 

13 REPLIES 13

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

 

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

 

eumak
Tera Guru

Hi @sruthig ,

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

 

 

Mark it as helpful or correct, If Applicable


Cheers..!

Happy Learning:)

Tushar

Raghu Ram Y
Kilo Sage

Hi @sruthig 

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.