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

Forum Posts

Resolved! Testing GlideAjax class from background script

If I have script include MyClass wich clicent callable with method  myFunction and if I pass  'sysparm_number' and 'sysparm_user', what is the code that I can put in background script to test? Appreciate it.

Giri6 by Tera Expert
  • 5218 Views
  • 7 replies
  • 0 helpfuls

Resolved! Formatting journal entries on mail scripts.

Hello All, I am looking for a way to nicely format an email notification. In particular when a note is added to an incident. At the moment we are just getting the journal entry and printing it on the notification: I would like to be able to separate...

find_real_file.png

Resolved! Convert Duration field into day

Hello All, I am working in scoped application and have to convert duration field into days not in hours or minute. it is giving the duration in like. I wants to convert minutes or hours in Days only.  I have tried using getDay or getDayPart/getNumeri...

find_real_file.png
ektakumari by Tera Contributor
  • 5581 Views
  • 5 replies
  • 3 helpfuls

Resolved! Return binary file from scripted rest api

Hello,Is there a way to return a binary file as output from a scripted rest API?The file is returned from another endpoint.I want to achieve something similar to what GlideSysAttachment().getContentStream(sys_id) and response.getStreamWrite allow. In...

Drct1234 by Mega Expert
  • 2855 Views
  • 5 replies
  • 1 helpfuls

Resolved! How to get display value of variable in Script Include?

Hi, I have a catalog client script that is calling a script include. However the variable is coming back as a sys_id, and I want it to come back as a display value. I have tried using .getDisplayValue() on the sys_id but it just shows up blank on the...

find_real_file.png find_real_file.png

Array returns "undefined".

Attempting to retrieve a list of CI's but the second Glide query returns undefined, what am I missing?   var appsArr = []; var gr2 = new GlideRecord('task_ci'); gr2.addQuery('task', current.sys_id); gr2.query(); while(gr2.next()){ appsArr.push(gr2....

Resolved! How Do You Nest Containers in Portal Layout

Trying to figure out how to nest the container widgets in the Service Portal. In example below, I have a 3/9 container. Want the 3 to be a long sidebar. Then I want to nest containers in the 9 section so I can added HTML headers (or a custom widget) ...

find_real_file.png
kshaw by Giga Guru
  • 2338 Views
  • 1 replies
  • 0 helpfuls

Resolved! Dependent value not working correctly?

Hi team, In incident form I am having a "category" field as reference type .So based an category the "subcategory 1" and "sub category 2" will select. But when I click the "category" value I am not able to see the "subcategory 1" and "sub category 2"...

Gokulraj1 by Kilo Contributor
  • 2992 Views
  • 9 replies
  • 4 helpfuls

How to get binary data of attachment?

Hi all, There is a sample coding which is from service now document. var attachment_sys_id = 'bacd7034dbeaa3403aff6a4948964f28';attachmentStream = new GlideSysAttachmentInputStream(attachment_sys_id); However, attachmentStream is just something like ...

Concur to ServiceNow integration

Hello Community, I want integrate Concur, an expense management system with the ServiceNow. Did any one here work on this? If yes, please provide me the steps or the link to achieve this integration. Thanks in advance.

Processor script in Scripted rest api

Hi All, I have a requirement where i need to download attachment from snow to local device using REST/SOAP.I found following link for the same and it is working absolutely fine. https://www.servicenowguru.com/scripting/download-attachments-zip-file/ ...

Rj27 by Mega Guru
  • 2533 Views
  • 2 replies
  • 2 helpfuls

Unique Key violation detected by database ((conn=999850) Duplicate entry '781b08101b739450c91421b4bd4bcb90' for key 'PRIMARY')

We have a Business Rule that creates an Incident from a New Call. When it runs, it gives the following error message, but continue to create the incident as expected: "Unique Key violation detected by database ((conn=999850) Duplicate entry '781b0810...