My script is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 02:23 AM
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
09-04-2025 03:48 AM
HI @Bhuvan ,
Thanks for replying.
I tried by commenting the tags query and ran the background script but still the request is not getting created and i also added the gs.info msg inside the if condition but logs are not showing seems issue with if condition but im not sure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 04:10 AM
Hey @suuriyas,
you double queried:
certificates.query('sys_tags','valid certificate');
certificates.query();
shouldn't it rather be?
certificates.addQuery('sys_tags','valid certificate');
certificates.query();
This reply is 100 % GlideFather and 0 % AI. Disaster may appear. Deal with it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 04:47 AM
@Ankur Bawiskar , @Bhuvan , @GlideFather .
Thanks all for your inputs.
I figured it out used encoded query for tags.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 05:05 AM
Glad to know it is working now.
If my responses helped to guide you or answer your query, please mark it helpful & accept the solution. As per community guidelines, you can accept more than one answer as accepted solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 10:11 PM
Did you get a chance to review this ?
If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
