
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎02-12-2019 09:29 PM
This Book let contains total service now scripting
- 5,745 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@pavan9885 Thank you for the attachment.
Can you provide the link for the origin of the guides? so. it'll help to get the remaining guides as like above.
Thanks in advance.
Regards,
Srikanth
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Target Date
- Set to Mandatory
- Should not be allowed to select
- past date prior to current date
- current date, If trying to submit after 4 PM of the current day, should select the next day.
Please help me and ,I have one script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading ||oldValue == 'newValue') {
return;
}
var date = new Date().toISOString().split("T")[0];
var date1 = new Date();
// alert("Current Date :" + date);
var target = g_form.getValue("t2r_target_date");
//alert("field Date : " + target);
// var nowDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
var today = date1.getDate();
// var nowDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + today;
var nextDate = parseInt(today) + 1;
if (nextDate < 10) {
nextDate = "0" + nextDate;
}
// alert(nextDate);
var nowTime = date1.getHours();
// alert(nowTime);
//alert(nowDate);
if (target <+ date) {
// alert("Valid Date");
if (nowTime > 16) {
// alert("Setting Tmrw Date");
g_form.setValue("t2r_target_date", date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + nextDate);
}
//else {
// // alert("Today Date");
// g_form.setValue("t2r_target_date", nowDate);
// }
} else
g_form.setValue("t2r_target_date", date);
}
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
nice

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello everyone
my colleague and I, we are trying to understand why we are not getting any expected result after creating a UI Action button with this condition "current.canWrite() && !current.begin.nil() && current.end.nil() && current.u_state !== 3 && current...."
Please assist

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Guess this is the PDF copy of the topic - Scripting in ServiceNow on our Product documentation.
Regards,
Anish

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks