Developer forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Forum Posts

How to add comments to tickets when UI action is clicked

For UI Actions, how would I add to the script to create a ticket comment whenever the button is used (i.e. if an analyst clicks the Send to Callback button in the ticket, put a note in the comments saying something like "Send to Callback button click...

MrBun256 by Tera Contributor
  • 4100 Views
  • 3 replies
  • 1 helpfuls

Resolved! How to redirect to an external URL from a catalog item

Hi, I would like to create a catalog item that redirects to an external URL.  In the past we have used the link icon and other things to achieve this, however, we're now not using any of these elements on any of the pages and only use the service cat...

Daniel Voutt by Tera Contributor
  • 5412 Views
  • 3 replies
  • 5 helpfuls

Resolved! Script to build JSON

Hi,   How do I build a JSON request for a Webservice call to be in this format?   {                "Address_Billing":                {                              "Description": "{DESCRIPTION}",                              "CompanyName": "{COMPANYN...

maryc by Tera Contributor
  • 15562 Views
  • 6 replies
  • 7 helpfuls

Resolved! How to change date format to Month DD, YYYY

Hi, How to change date format from YYYY-MM-DD to Month DD, YYYY (for instance May 07, 2021)? script include function getEmployeeDate: function() { var grHRProfile= new GlideRecord('sn_hr_core_profile'); grHRProfile.addQuery('...

find_real_file.png find_real_file.png
kris29 by Tera Contributor
  • 7655 Views
  • 27 replies
  • 6 helpfuls

Resolved! Filter User Field to Show Manager, Manager's Manager

I am trying to create a Catalog Item with (among other things) the following two fields: Submitter and Approver. I want to put a filter on the Approver field, so it is dependent upon the Submitter.  Basically, the choices for Approver should be limit...

jmiskey by Kilo Sage
  • 4072 Views
  • 9 replies
  • 3 helpfuls

Resolved! How to create Dynamic Filter Option for Department

Our team wants to create a dynamic filter option that allows a someone to filter a list by the logged-in user's Department.  We tried to follow the ootb Me filter, but couldn't get anything to work.  In the script, we have  gs.getUser().getDepartmen...

yundlu316 by Kilo Guru
  • 5164 Views
  • 6 replies
  • 5 helpfuls

How to know what triggered an event?

Hello,Is there a way to know what triggered an event?A record is inserted into a table and based on that an event fires and that event triggers a notification. It works as expected.   I want to make slight changes to the parameters getting passed to ...

mariedutton by Giga Contributor
  • 6380 Views
  • 2 replies
  • 2 helpfuls

Resolved! getNumericValue() is not working.

Hi Every one, getNumericValue() is not working, below is the script.   var start_date = new GlideDateTime();var end_date = '04-02-2020 07:30:00'; gs.print(start_date.getNumericValue());gs.print(end_date.getNumericValue());gs.print(new GlideDateTime()...