How to give the condition when incident updation not in creation

mania
Tera Contributor

Hi,

 

I have created business rule for time worked field but that business rule is working for when incident record is creation and updation but I want that business rule should work only when record is updation not for creation so how to do that? I have provided below code is done previously.

Can you please help on this, It will be helpful.

mania_0-1707823978080.png

mania_3-1707824030097.png

 

Thanks in Advance!

4 REPLIES 4

Sarika S Nair1
Kilo Sage

Hi @mania , 

In when to run section if we choose before update , then that BR will trigger only for updation. 

Could you please verify once more..whether you have not selected before insert?

@Sarika S Nair1 

 

I have tested multiple times but when record creation I got the error message when time worked is empty but I dont want that Error message when record creation.

Its only Before - update

Can you please help on this, It will be helpful.

 

Thanks!

Mania

Hi @mania , 

Please verify whether there is any other BR created for before insert with same condition.

BR will only trigger based on the When to Run condition.

Also clear cache and try once.

 

if that also not resolving then try using below condition

SarikaSNair1_0-1707826356268.png

 

Maddysunil
Kilo Sage

@mania 

you can put your code inside this

if (current.update() && !current.insert()) {

// Your business rule logic here gs.info("Business rule executed on update");

}