Scripting: How to use logger.info()
Can anyone tell me how this works in the table scripting? I wanted to verify the value of a calculation but I can't get it return a variable, just a static value. Returning a variable always gives me an error even if the variable successfully writes to a field.
You can use logger.info() in several ways to validate that the script is working as designed and control the errors in the error logs when something does not work.
For example, if you want to validate that a certain field has a value, you can write the script like this before the if() statement: logger.info(currentValues['Field Name']). This is to check that that field has a value in the first place. If you have a multi-step script, you can put a logger.info in the middle to check if the script made it that far: logger.info('Step 3 Completed) which will show "Step 3 Completed" in the error logs.
Hope this helps!