When to use script actions vs business rules

sonita
Giga Guru

When to use script actions vs business rules for email notifications?

5 REPLIES 5

srinivasthelu
Tera Guru

For me, Async Business rule and Script Action execution through event is same.



If you are asking the   before/business rules   vs Script Actions, You would normally use Script actions when ever you want to execute something asynchronously.



Thanks


Srini


Deepak Ingale1
Mega Sage

Hi Soni,



Email notifications can have two trigger points



1) Event Driven : System generates the events via scripts like Business Rules, Email notification is processed based on event generated


2) Condition Driven: We can use the condition fields on email notification to send out emails.



Script Actions requires event to fire, as Srinivas has already mentioned, those are just similar to Async Business rule but "Dependant" on events


JamesEcoStratus
Mega Guru

Hi Soni,



As added context.



Knowledge15 Session: Scripting 301: Advanced JavaScript Techniques for ServiceNow


And/Or this wiki article should help (Excerpt below) Differences Among Scripts - ServiceNow Wiki



1.2 Important Differences

The most important differences among scripts are


  • the function of the script (what it is used for) and
  • whether the script runs on the client or server.

1.3 Client vs. Server

The web browser is the client, and is often the only software that is installed at the customer site.The application server and the database are located at the data center.


  • Client scripts run on the client (which is the web browser)
  • Server scripts run on the server (which includes the application server and the database)

The web browser is where you control and communicate with an instance, including communicating with the server and database.


Note


Note: When you are writing scripts, you cannot use reserved words.


James


i am not able to access the link Knowledge15 Session: Scripting 301: Advanced JavaScript Techniques for ServiceNow.