Monday, July 30, 2018

Convert the timezone to GMT timezone in ServiceNow

// start and end dates are in the client's timezone
var start = current.u_change_start_date.getGlideObject().getNumericValue();
var end = current.u_change_end_date.getGlideObject().getNumericValue();

var gdt = new GlideDateTime(gs.nowDateTime());
var timeZoneOffSet = gdt.getTZOffset();


// start and end times are in the current timezone
// current date time is in the GMT timezone
// converting start and end times to GMT timezone

start += timeZoneOffSet;
end += timeZoneOffSet;

Tuesday, July 17, 2018

ServiceNow IT Asset Management - Part2


What is IT Asset Management lifecycle?


The asset management lifecycle covers the period from initial request for an item through procurement, delivery, stocking, deployment, monitoring, support, installation (as well as all moves, adds, or changes in location), upgrades, reuse, termination, disposal, and replacement.
The wide-ranging factors under asset management have been classified using a simple, three-stage format. This is to help you understand and manage with ease the best practice methodology in asset management. The critical aspects of the cycle, from a data accuracy perspective, include request and procurement at the front end of the cycle and disposal at the back end. The asset changes that take place fall in between.




Standard process for maintaining the life cycle of an asset



ServiceNow IT Asset Management - Part1


What is IT Asset Management?


IT asset management (ITAM) is a set of business practices that join financial, contractual, and inventory functions to support life cycle management and strategic decision making for the IT environment. Managing IT assets allows you to get maximum value from the use of the assets, right-size IT inventory, and optimize inventory purchase decisions and strategies.

Hardware Asset Management

Hardware asset management is the process of tracking and managing the physical components of computers and computer networks, from acquisition through disposal. The goals of hardware asset management are to account for all hardware assets on the IT infrastructure to provide comprehensive inventory visibility. Further, to help with vendor contract and lease management, and to assist in making budgetary forecasts based on the stock of assets and business requirement.


Software Asset Management

Software asset management is similar to hardware asset management, but focuses on software assets, including licenses, versions, and installed endpoints. ITIL states that the goals of software asset management are to reduce IT costs and limit business, legal and security risks related to the ownership and use of computer software, while maximizing IT responsiveness and end-user productivity

IT Asset Management Methodology

The major goal of ITAM is to establish a centralized asset repository that accounts for the presence and purchase of all your hardware and software inventory. 

To achieve this, ITAM methodology comprises the following steps:

·         Asset discovery, data capture and storage – Discovering all hardware and software components of IT inventory on the IT infrastructure and capturing their details, such as the type of asset, make, specification, etc., and storing it in an asset repository

·         Asset tracking – Being able to identify and track change in the location of assets, increase or decrease the number of assets, track assignment status and user information

·         Asset life cycle management – Being able to capture the asset life cycle data right from requisitioning, purchase and assignment, to expiry and decommissioning

·         Asset reporting and alerting – Being able to generate asset inventory reporting, and receive alerts on asset warranty and lease expiration

Friday, July 13, 2018

Get URL Parameters in a ServiceNow Client Script & Catalog Client Script

Create a onload client script



function onLoad() {
    var emp_sys_id = getParmVal('sysparm_emp_sys_id');
}


function getParmVal(name) {
    // get the current URL
    var url = document.URL.parseQuery();

    // decode the URL
    if (url[name]) {
        return decodeURI(url[name]);
    } else {
        return;
    }
}