- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 07:18 AM
Also what is the difference between
var StringUtil = new GlideStringUtil();
and this?
var StringUtil = GlideStringUtil ;
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2016 04:35 AM
Well prasanna,
GlideStringUtil is a global variable, its not a class. See Download Attachments as a ZIP File - ServiceNow Guru
To use GlideStringUtil:
var StringUtil = GlideStringUtil;
var sa = new GlideSysAttachment();
var binData = sa.getBytes(current);
var encData =StringUtil.base64Encode(binData);
There are a lot of useful functions in GlideStringUtil. These are:
--
Cheers,
AR

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 07:22 AM
Hi Prasanna,
I don't see enough documentation on this one. I will let you know if I find anything on this.
How to Escape in Jelly - ServiceNow Wiki
Scripted Web Services - ServiceNow Guru

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 07:23 AM
Hi Prasanna,
There doesn't appear to be any official documentation on GlideStringUtil (yet).
The difference between the first line and the second line of code you have is that the second one is invalid. The first instantiates the class (to make an object) and the second is looking for a variable called GlideStringUtil, which likely doesn't exist.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 07:24 AM
I have sent a request to our developer docs team to get something documented on developer.servicenow.com. No ETA as of yet.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 07:27 AM
Thanks Chuck. I was about to send email to them