Skip to content

Instantly share code, notes, and snippets.

@icerge
Last active October 11, 2018 22:31
Show Gist options
  • Save icerge/0b7f581015186f4730c9598201bffebd to your computer and use it in GitHub Desktop.
Save icerge/0b7f581015186f4730c9598201bffebd to your computer and use it in GitHub Desktop.

Evaluate your scripts safely, 'cause safity is #1 priority.

var name = "Processor";

// var int_custom = eval("new SIName" + name + "(xml, ticket);");

var gc = GlideController;
gc.putGlobal('xml', xml);
gc.putGlobal('ticket', ticket);
var int_custom = gc.evaluateString("new SIName" + name + "(xml, ticket);");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment