Skip to content

Instantly share code, notes, and snippets.

salcosta

Block or report user

Report or block salcosta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View must be high
var $0 = 0;
var $1 = 1;
var $2 = 2;
var $3 = 3;
var $4 = 4;
var $5 = 5;
var $6 = 6;
var $7 = 7;
var $8 = 8;
var $9 = 9;
@paulsena
paulsena / AppAccessRequestHelper.js
Created Apr 8, 2014
ServiceNow Scripted Web Service example that will create a Service Request item with variables. Has user friendly data validation. This particular example is for an Item called Sailpoint and passes 3 variables. The web service checks mandatory fields and validates data is valid. Returns user friendly error messages if it fails any of the checks.
View AppAccessRequestHelper.js
var AppAccessRequestHelper = Class.create();
AppAccessRequestHelper.prototype = {
initialize: function() {
this.debug = gs.getProperty("intuit.custom.debug", "true");
this.error_message = String();
this.applicationId = '';
},
//WS Wrapper function to handle Request and Response Object.
//This is called from a Scripted WS.
@paulsena
paulsena / SAML 2.0 Update 1 Modified AuthN POST.js
Created Apr 8, 2014
Modified version of SSO SAML 2.0 Update 1 Script Include. Adds support for HTTP POST on AuthNRequests. Out of box ServiceNow just supports HTTP Redirection when sending Auth Requests from SN to the Identity Provider. Added a new function called generateAuthnRequestForm. Call this function from the Installation Exist Script instead of generateAut…
View SAML 2.0 Update 1 Modified AuthN POST.js
gs.include("PrototypeServer");
var SAML2Error = Class.create();
SAML2Error.prototype = Object.extend(new Error(), {
initialize : function(message) {
this.name = "SAML2Error";
this.message = message;
}
});
@paulsena
paulsena / JournalSyncHelper - Include.js
Created Apr 8, 2014
Service Now Helper Script to Syncronize the Journal fields between Instances. If you can, it is recommended to just sync the text using getJournalEntry. This script will replicate all Activity log history, Audit records, and Journal table entries so it looks like it originated from the target instance.
View JournalSyncHelper - Include.js
/*Name: JournalSyncHelper
* Description: Helper class for Masco Milgard 2 way sync. Allows Journal fields (Comments, Worknotes) to be synced.
* Helper functions to package up Comments and WorkNotes to a JSON String. Also function to decode and insert
* packaged journal field back in SN.
* Author: Paul.Senatillaka@fruitionpartners.com
*
* Version: 2.0 - 10/11/13 - Rewrite from v1 to better handle large comments and numerous other fixes.
*/
gs.include("PrototypeServer");
var JournalSyncHelper = Class.create();
@paulsena
paulsena / CSV Delimiter Check.py
Created Apr 8, 2014
Python script to check for mismatched number of Columns in a CSV file. Useful for checking files before loading into ServiceNow because SN doesn't tell you what line number had a mismatch, it just rejects the whole file.
View CSV Delimiter Check.py
#! /usr/bin/env python
import fileinput
import sys
headerColCnt = 0
mismatches = 0
delimiter = "|"
def process(line):
global headerColCnt
You can’t perform that action at this time.