How to add log activity in a scheduled script using a property?

yolanda7
Giga Contributor

Hi Experts,

I am trying to add a log activity into a scheduled script using a true/false property. When this property changes to 'true', the log activity should be enabled on that script without any impact to other users' activities(avoiding to activate the logs for everybody) using a System property category. Does anyone know how to get through this?

find_real_file.png

find_real_file.png

Thanks!

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

on your scheduled script add something like

var debug = gs.getProperty('yourpropertyname') == 'true' || false;

than add to script what you want to log something like

if (debug) {
gs.log("Users:  " + your field name);
}

View solution in original post

2 REPLIES 2

Mike Patel
Tera Sage

on your scheduled script add something like

var debug = gs.getProperty('yourpropertyname') == 'true' || false;

than add to script what you want to log something like

if (debug) {
gs.log("Users:  " + your field name);
}

Thank you Mike it works!