When to use script actions vs async business rules

Suggy
Giga Sage

When to use script actions vs async business rules

1 ACCEPTED SOLUTION

Yes, you can do this also with async BR also.But, you can't make BR reusable.Instead, your script action which triggers on event creation can be called by any server script.

 

Regards,

Sachin

View solution in original post

6 REPLIES 6

Aoife
Tera Guru

So, I learned something new today!  That's awesome, love learning new things.  A script action is just a script this is executed by sending an event.  They event fires the script.

So, the only real differences I see between using a script action and an async BR are:

1. Async BR will get scheduled immediately upon database action just like any after BR would.  A Script Action would require a BR to fire an event for it to get executed, so 2 scripts vs 1 script to do the same thing.

2. Async BR already knows what record it was fired for so you do not have to go get it again, current will already have the record handy.

Once executing, both are probably equal and usage depends greatly on what level of decoupling you are going for.

Aoife

You can also trigger script action from anywhere like even from UI actions