Business Rule not triggering on Insert, but working on Update

David Boom
Tera Contributor

Trying to update field on task on insertion but it is working only on update.

Image (1).jpg

18 REPLIES 18

SakshamSahu
Tera Contributor

Hi @David Boom,

If this BR is working on update but not on insert then this might be due to the perticular field value not available until after the record is inserted into the table.
So using before BR will not help in this case, for this you can use After BR using Gliderecord on the same table to use "obj.update()" this helps to avoid recursion risk.

var gr=new GlideRecord("sn_grc_indicator_task");
 if (gr.get(current.sys_id)) { // Fetch the current record
var gm=gr.indiactor.entity.name;

gr.u_entity_name=gm;

gr.update(); // No recursion risk }

Rushi Savarkar
Kilo Sage

Hello @David Boom 

Your business rule should be run after insert/update and in the script section, you just have to add a current.update() after 3rd line in your script

 

If my response helped, please mark it as helpful

thank you!

If my response helped you, please accept the solution and mark it as helpful.
Thank You!

No, it's not working 

 

@Ankur Bawiskar 

@David Boom 

Can you give the updated script?

thanks!

If my response helped you, please accept the solution and mark it as helpful.
Thank You!