- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 09:47 AM
I would like to have a pop-up be displayed to an ITIL user when a Configuration Item Related List is present and active.
I have been reviewing and i can add an info message at the top but this can easily be ignored.
What i have come up with a simple alert message
What i have so far is a client script that i need to set for each table.
Presently, we use Server, Computer, and Network gear. When there is an active related list, i would want to display a message
function onLoad() {
//Type appropriate comment here, and begin script below
alert('Please Review any open CMDB Task Items');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 10:46 AM
Hi Carlos,
Sorry my bad. Missed a closing parenthesis.
Should be fine now.
Regards,
Venkat
Code Below:
function onLoad() {
getGrandRows();
}
function getGrandRows() {
setTimeout(function(){
var list = GlideList2.get("x_snc_ci_validator_validation_task");
// You can get the ID of related list from the developer tool bar. Check for the div holding the content and grab the list id.
if(list && list != undefined) {
var numberOfCMDBItems = list.grandTotalRows; // This parameter tells us number of rows in that list. Which should be greater than zero for alert
}
if(numberOfCMDBItems)
alert("'Please Review any open CMDB Task Items");
}, 3000);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 09:33 AM
Venkat,
i get the following error
Could not save record because of a compile error: JavaScript parse error at line (16) column (2) problem = syntax error
which is the last two lines
}, 3000);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 10:46 AM
Hi Carlos,
Sorry my bad. Missed a closing parenthesis.
Should be fine now.
Regards,
Venkat
Code Below:
function onLoad() {
getGrandRows();
}
function getGrandRows() {
setTimeout(function(){
var list = GlideList2.get("x_snc_ci_validator_validation_task");
// You can get the ID of related list from the developer tool bar. Check for the div holding the content and grab the list id.
if(list && list != undefined) {
var numberOfCMDBItems = list.grandTotalRows; // This parameter tells us number of rows in that list. Which should be greater than zero for alert
}
if(numberOfCMDBItems)
alert("'Please Review any open CMDB Task Items");
}, 3000);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 12:31 PM
it still didnt work. i updated. I will revisit this soon.
Venkat , i truely appreciate the help.