- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2017 10:50 PM
How make a popup (alert box) on load of a incident form which displays the current date and time.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2017 12:07 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2017 10:53 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2017 10:59 PM
Hi Piyush,
Create an Onload script and it will work.
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){
dd='0'+dd;
}
if(mm<10){
mm='0'+mm;
}
var today = dd+'/'+mm+'/'+yyyy;
alert(today);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2017 12:02 AM
Hi Vinoth,
Thanks for the code. As I am new to ServiceNow coding thing. Could you please help me where excatly I should write this code on my service now Dev environment.
BR// Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2017 11:01 PM
Hi,
You can put date in display business rule and use it in client side script for non catalog item stuff.
on catalog item you can get it using glideajax and script include.
-Girish