My script is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
HI Community,
I have a requirement to generate a request when the records in sys certificate table has no valid from and no expires and with tag as valid certificate only for these records the request needs to be generated after 11 months from the created date.
so i have written a scheduled job for this and i tried testing it in background script but it is not working
Please let me know what is wrong in my script
Note ; while testing i commented out this line (createdDateTime.addMonths(11);)
and created one new record in certificate table today and tested but it did not work
My script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
what debugging did you do?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
are you sure you are forming the correct query for tags?
did you add gs.info() and see?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
HI @Ankur Bawiskar ,
Thanks for replying
yes i added the gs.info msg inside the if condition but logs are not showing seems issue with if condition but im not sure.
Just for testing i commented out the tags query also but no luck.
In sys certificate table there is one record that matches but not sure why if condition is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
till the time your query works fine, it won't go inside.
I have doubt about sys_tags field query syntax.
please check that
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader