Does this package "Packages.com.glideapp.questionset.SequencedQuestionSet " works prior to calgary release
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 01:51 AM
I have tried to call this package it shows its valid package .
But when i tried to execute the following script for RITM as well as change record in background it doesnt return any variable from "vs" variable but there are number of variable present in the form.
var keys = new Array();
var set = new Packages.com.glideapp.questionset.SequencedQuestionSet();
set.setTableName(current.sysapproval.sys_class_name);
set.setTableSysID(current.sysapproval);
set.load();
var vs = set.getFlatQuestions();
if (vs.size() > 0){
gs.print("hello");
}
Can anyone please suggest what mistake i did in this script to work?
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 02:48 PM
I think they blacklisted (correct term?) many of the Packages.com objects for security reasons, and replaced them with Glide objects.
For example, I know that in Calgary "Packages.com.glide.communications.HTTPClient()" no longer works, and instead I have to use GlideHTTPClient().
See: http://wiki.servicenow.com/index.php?title=Packages_Call_Replacement_Script_Objects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 11:10 PM
Hi ,
I know it works on calgary release.I have tried in Berlin release it doesn't work.So please let me know is the mentioned package by me works or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 03:11 PM
Before Calgary that Package and those methods should be available. In Calgary, I see the scriptable name for that Packages is GlideappSequencedQuestionSet, and I see the methods should also still be available through that scriptable name.
I tested in Aspen (since the subject of this post says "prior to Calgary"), and the script as you have written it works if I pass "change_request" as the parameter to setTableName, and a valid sys_id as the parameter to setTableSysId.
Try the following instead. Maybe you need to pass Strings instead of GlideElements:
var keys = new Array();
var set = new Packages.com.glideapp.questionset.SequencedQuestionSet();
set.setTableName(current.sysapproval.sys_class_name.toString());
set.setTableSysID(current.sysapproval.toString());
set.load();
var vs = set.getFlatQuestions();
if (vs.size() > 0)
gs.print("hello");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 11:19 PM
I have tried same script in Berlin release with string parameter but still it seems not working