Questions tagged [servicenow-client-scripts]

ServiceNow Client Scripts are JavaScript-based automation scripts created by customers. Use this tag for any question about writing or running Client Scripts in ServiceNow.

ServiceNow Client Scripts are JavaScript-based automation scripts created by customers.

13 questions
3
votes
1 answer

ServiceNow UI Page GlideAjax

I created a form using UI Page and am trying to have some fields autopopulated onChange. I have a client script that works for the most part, but the issue arises when certain fields need to be dot-walked in order to be autopopulated. I've read…
Dave
  • 1,257
  • 2
  • 27
  • 58
1
vote
1 answer

ServiceNow - Call a client script from form button click event to save image and caption

I was trying to create custom feature in User(sys_user) section to Save a photo and caption to a custom table. I want to save the photo and caption and show all the uploaded photo as thumbnail along with caption. But when I tried to call…
Rameez
  • 601
  • 1
  • 8
  • 22
1
vote
1 answer

ServiceNow: JavaScript TypeError: Cannot read property of undefined

I am writing an onChange Client Script in ServiceNow and having issues with a Javascript error on the front end client. I keep getting a TypeError: Cannot read property 'u_emp_name' of undefined. the variable seems to vary as at one point i was…
0
votes
2 answers

ServiceNow Application

How to do export and import the script includes functions to another javascript in servicenow application. I need to call doMultipy fuction from another javascript file on servive now application. Anyone help on this? Code Snippet
0
votes
0 answers

Integrating ServiceNow for Agent Transfer: How to Create Chats from External Systems?

I have a specific use case where I need to integrate my system with ServiceNow to create chats on behalf of users and receive agents' messages. After researching, I came across the AWA module in ServiceNow, which allows transferring chats to agents…
0
votes
0 answers

How to format , set min , set max date attributes in servicenow date picker?

Im currently designing the widget in servicenow widget editor where I wanted to use date picker. How to format the date, set min , set max date attributes in servicenow date picker?. The below HTML elements sets the date as "MM-DD-YYYY" when I…
0
votes
1 answer

Odd behaviour of ng-if in widget

Can anyone explain this to me? I'm editing a widget and in the client HTML there's two ng-if statements (I've added the second, the first was already there).
  • Spike
    • 33
    • 1
    • 7
  • 0
    votes
    1 answer

    Select values for a reference field, based on a table and another reference field

    I wish to select a field and based on the linkage for that field, only choose values from another field which have not been linked earlier. We have 4 tables and forms. 2 are reference data tables. These have data for Users and…
    gagneet
    • 35,729
    • 29
    • 78
    • 113
    0
    votes
    1 answer

    how to include a client script in ui page of servicenow

    I need a help like suppose I have a simple html ui page in ServiceNow. I want to include a client script. How to do this? I tried using but it did not work

    The…

    Alok Kumar
    • 41
    • 6
    0
    votes
    1 answer

    Asset field problem with onChange client script

    I'm working on client script which reads data from alm_hardware table and reads also value from field u_invoice_date and that value is displayed in form field called invoice_date. This script works fine, but I found one problem: when u_invoice_date…
    0
    votes
    1 answer

    How to call script include from the client script servicenow?

    Can anyone help me with how to call the script include from the client script? function onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } //Current assignment group …
    Mr world wide
    • 4,696
    • 7
    • 43
    • 97
    0
    votes
    1 answer

    Calling onSubmit in a callback function leads to infinite loop

    I am comparing 2 variables for dates start_date and end_date and allowing to submit the form only in case end_date is bigger than start_date, else rejecting the form to be submitted, but while running this code, it goes into the infinite loop and if…
    -1
    votes
    1 answer

    How to override the service now's email notification onclick event

    I have a requirement that, when I click the email notification link in ServiceNow, the system should check whether a particular field is null. If it is not null then only the ServiceNow's email notification window should open, otherwise one alert…
    user768990
    • 89
    • 1
    • 3
    • 8