Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Script error in Collaboration Offline Email Batching Script Action - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Script error in Collaboration Offline Email Batching Script Action
KB0787994

Script error in Collaboration Offline Email Batching Script Action


438 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Issue in the above script action Collaboration Offline Email Batching Script Action when reviewing logs for an unrelated issue. This also seems to be present in my New York PDI. It seems that math is incorrectly used inplace of Math, the latter seems to work fine in background script

org.mozilla.javascript.EcmaError: "math" is not defined.
Caused by error in sysevent_script_action.0f338b329f132100d5f9b3e2957fcf07.script at line 15

12: var hoursInterval = 0;
13: var delayString = "";
14: if(minutesInterval >= 60) {
==> 15: hoursInterval = math.floor(minutesInterval / 60);
16: minutesInterval = minutesInterval % 60;
17: if(hoursInterval < 10)
18: delayString += "0";

Steps to Reproduce

Execute the same code of the script as background, or even executing math.floor(22 / 60); you will see the same error as math is not a valid javascript object because the language is case sensitive.

Workaround

"The statement "math.floor()" is inside an IF condition which compares the value of collaboration.email_interval and checks if it's greater than "60" and only when the comparison is true, the math.floor() statement will be executed.

Hence the IF condition will never be true and the statement will never be executed and won't cause an issue."

There is no workaround but disregard this message in the logs. 


Related Problem: PRB1376468

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.