- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:16 AM
Hello guys,
just came across scriptlet_function table. Anyone seen that already? What it does and how to use it? If GlideScriptEvaluator() is the way to use it - why is this needed ?
Any insights are much appreciated!
Cheers,
Joro
Solved! Go to Solution.
- 5,534 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:28 AM
Hi Joro, scriplets are functionality added in Paris that give you a scripting environment that doesn't load the ordinary scripting scopes you would have in a server-side script. It is isolated from script includes and most APIs and just has access to the vanilla rhino javascript.
I think its purpose is to support some future functionality, and I don't think it's very useful for customer/partner developers in its Paris version.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:28 AM
Hi Joro, scriplets are functionality added in Paris that give you a scripting environment that doesn't load the ordinary scripting scopes you would have in a server-side script. It is isolated from script includes and most APIs and just has access to the vanilla rhino javascript.
I think its purpose is to support some future functionality, and I don't think it's very useful for customer/partner developers in its Paris version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:49 AM
Hey Brad,
yes, you are correct - no SI,etc allowed, only glide system objects. So I would say you are correct - its for some unknown future use 😄
Thanks!
Joro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:32 AM
Okay,
I think I got it. As of the licensing cost and stuff, if you create a new custom field (in our case type Script) you should pay for that. With this table, you just add records in there and then you call GlideScriptEvaluator(). Then you dont have to pay for scripted fields - if you meed to have such one.
Example:
Create record "test" and in script field add "gs.addErrorMessage("TEST");
SAve the record.
Note its sys_id (or query by name)
In background script add :
var evaluator = new GlideScopedEvaluator();
gr = new GlideRecord('sys_scriptlet_function');
gr.get('<sys_id>');
gs.info(evaluator.evaluateScript(gr, 'script'));
Then execute and the message will be seen
Cheers,
Joro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2020 06:46 AM
Hi Joro, with GlideScopedEvaluator you can evaluate any script that exists in a script field, but I don't believe that is the purpose of this new table. I would just use a Script Include or something similar.