System Log: Send a log when business rule is run

Desmo
Mega Guru

Hello Community,

How can I capture the business rule name and send it to the sys log without have to explicitly type the name?

 

gs.info("Business rule XYZ triggered.");

To use current.name does not work because current applies to the table where the business rule is run.

Thank you.

Desmo

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to hard-code the name of business rule.

there is no way to get the name of BR dynamically

Regards
Ankur

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to hard-code the name of business rule.

there is no way to get the name of BR dynamically

Regards
Ankur

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

Anshu_Anand_
Kilo Sage
Kilo Sage

What is the requirement?

For debugging purposes ,you can use the script tracer functionality.

Regards,
Anshu