Wednesday, April 19, 2017

Retrieve the URL parameters in the ServiceNow Scripting



var billingCode = getParmVal('sysparm_number');

function getParmVal(name) {
    var url = document.URL.parseQuery();
    if (url[name]) {
        return decodeURI(url[name]);
    } else {
        return;
    }
}

Thursday, April 6, 2017

What user name and password we should give during ServiceNow MID Server configuration?


We know that Service/Deamon that facilitates the communication between ServiceNow instance and external Services/Data Sources.


During the configuration of agent/config.xml we need to give the username and password. For that

  1. Create a new user say SNCMidServerDev1
  2. Assign the mid_server role to the user (Not the admin role and never)
    1. Just the mid_server role is sufficient
  3. Use those credentials in the Midserver configuration
                    

Sunday, March 12, 2017

Howmay types of users we have in ServiceNow?

We have 3 types of users in SNOW

1. ESS Users: Employee Self Service Users
2. ITIL Users
3. Administrators

How to change the branding in Servicenow

Log on to the ServiceNow instance as the administrator and create the updateset as required to capture the changes

Navigate to System Properties -> My Company and update the Banner Image which is highlighted as below


Wednesday, August 17, 2016

ServiceNow Function to Convert Incident to Service Request


function createRequest(incident) {
   var sc_req = new GlideRecord ("sc_request");
   sc_req.initialize();
   sc_req.u_requested_by = current.u_contact_person;
   sc_req.u_requested_by_phone = current.u_contact_phone;
   sc_req.location = current.location;
   sc_req.requested_for = current.caller_id;
   sc_req.phone = current.u_customer_phone;
   sc_req.u_computer_name = current.u_computer_name;
   sc_req.short_description = current.short_description;
   sc_req.description = current.description;
   sc_req.contact_type = current.contact_type;
   sc_req.assignment_group = current.assignment_group;
   sc_req.u_business_service = current.u_business_service;
   sc_req.category = current.category;
   sc_req.subcategory = current.subcategory;
   sc_req.cmdb_ci = current.cmdb_ci;
   sc_req.assigned_to = current.assigned_to;
   sc_req.parent = current.sys_id;
   sc_req.close_notes = current.close_notes;
   sc_req.u_phi_details= current.u_phi_details.getJournalEntry(-1);// -1 gets all journal entries as a string
   sc_req.work_notes = current.work_notes.getJournalEntry(-1);
   var reqSysID = sc_req.insert();

   GlideSysAttachment.copy('incident', current.sys_id, 'sc_request', reqSysID);
   gs.eventQueue("incident.to.request", sc_req, sc_req.number, incident.number);

   gs.addInfoMessage('Request Created: ' + sc_req.number);
   action.setRedirectURL(sc_req);
   
   if (incident.assigned_to.nil()) {
      incident.assigned_to = gs.getUserID();
   }
   incident.state = 7;
   incident.active = false;
   incident.category = 'Request';
   incident.close_code = 'Moved to Request';
   incident.close_notes = 'Moved to Request: ' + sc_req.number;
   incident.comments = 'Moved to Request: ' + sc_req.number;
   incident.parent = reqSysID;
   incident.update();
   gs.addInfoMessage('Incident Closed: ' + incident.number);
}

Tuesday, December 15, 2015

Splunk Integration steps with ServiceNow - Fuji and Eureka Versions


Why do we need to integrate ServiceNow with Splunk?

If you want to enable users to create incidents and events in ServiceNow using the custom generating search commands, custom streaming search commands, or alert-triggered scripts, you must integrate ServiceNow with your Splunk platform instances.


Note: performing push integration with events, ensure that you have the Event Management plugin installed and enabled before you proceed

The below document from the splunk will give step by step instructions for integrating Splunk with ServiceNow

The link to the document is here