We can remove the default formatting on the integer field by adding the attribute format=none on the dictionary.
Before adding a format attribute to the dictionary.
Here is the attribute on dictionary field.
var parentSI = Class.create();
parentSI.prototype = {
initialize: function() {
},
upperCase : function(string){
return string.toUpperCase();
},
type: 'parentSI'
};
Below you can see how childSI Script Include extended parentSIvar childSI = Class.create();
//we need to use Object.extendsObject for extending an existing script include
childSI.prototype = Object.extendsObject(parentSI,{
initialize: function() {
},
callParent : function(string)
{
//calling a method from extended Script Include
return this.upperCase(string);
},
type: 'childSI'
});
var result = new childSI().callParent('servicenow');
gs.log(result);
Output: *** Script: SERVICENOW
Please click here to read more on extending Script Include.
var gePN = new GlideElementPhoneNumber(); // if we have a valid number, parse it var valid = gePN.setPhoneNumber("+" + '15406871234', false); if (valid) { var country = gePN.getTerritory(); gs.log(country); }
for(var property in c.data){ console.log('c.data.' + property + ": " + c.data[property]); }
//this will give you array of changed field names var changed _fields = getChangedFieldNames(current); function getChangedFieldNames(gr) { var result = []; var elements = gr.getElements(); var size = elements.length; for (var i = 0; i < size; i++) { var ge = elements[i]; if (ge.changes()) { result.push(ge.getName()); } } return result; }