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

 

@David Boom 

 

I tried to replicate your scenario in my instance. I took Company Name, and it should be set to the new custom field Company Name.

AFTER: Insert/Update

(function executeRule(current, previous /*null when async*/) {

    var companyName = current.company.name;
    current.u_company_name = companyName;
    current.update();

})(current, previous);
RushiSavarkar_0-1740466263838.png

 

If it helped, please mark it as helpful!

thanks!

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

My BR is in scoped application, is it impacting?

I don't think so

While creating a record in the Indicator Task table you have to check that the Indicator field should not be empty. I believe the Indicator field is a reference field, so in the indicator form the Entity field should not be empty and again Entity is also a reference field, so the Name field in Entity form should not be empty

Please check the above conditions!

If it helped, please mark it as helpful

thanks!

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

@David Boom 

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader