- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 10:41 PM
Hi,
I have a requirement to write a scheduled job which runs every weekday.
I have developed a catalog item which looks as follows:
When I fill this catalog item, it automatically creates a Request, RITM and Catalog Task.
So now, this catalog item should be ordered automatically every weekday so that it finally creates a Request, RITM and Catalog Task.
I am very new to Servicenow and unable to think of how to solve this. Please help.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:33 PM
Run:onDemand
conditional: true
condtition:
function checkWeekdays() {
var now = new Date();
var day = now.getDay();
var result = false;
if(day != 0 && day != 6) {
result = true;
}
return result;
}
checkWeekdays();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:36 PM
Yes, you are correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2021 01:26 AM
Hi
Can we add Requested for, location, and other fields in this script ???
By the above script, we can create RITM but the description and other fields are showing empty. how can I fill them by script. ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2020 05:18 PM
Hi, this has been really helpful. I just have 1 question, I see that it is possible to create de RITM along with the REQ and set the variables, my question is regarding the fields in the RITM table.
Is it possible to include these as well in the script?
Thanks in advance.