Custom app Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 12:33 PM - edited 08-02-2024 01:59 PM
I have a custom app which has a scheduled job that sends notification and sets a flag (set flag = true) value in the table inside the custom app. This works fine in dev and prod but not in prod. In prod, it sends the notification but not set the value of flag as true.
What could be the reason?
1. I created a new job and copied the code but still only email get sent but not setting the value of flag
2. I checked the ACL of the table nothing drastically different between the prod and dev/test
var today = new GlideDate();
var gr = new GlideRecord("table name");
gr.addQuery('u_notice_dates', today); // Add query to find records with notice date as today
gr.query();
while (gr.next()) {
if (gr.u_final_notice_sent != 'true') {
gs.eventQueue("eventname", gr); //event that sends out notification
gr.u_final_notice_sent = 'true';
// Update the record with the new flag value
gr.update();
}
}
What else could I be potentially missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 01:24 PM - edited 08-02-2024 01:26 PM
Since you have not posted the scheduled job, it will be hard for anyone here to provide assistance. You also need to post some details on "sets a flag".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 02:30 PM
Thanks @Bert_c1 I added the code now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2024 03:42 PM
Is 'u_notices_date' defined as a Date field? and how is 'u_final_notice_set' defined. you have string values for 'true' in you code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 02:25 PM
u_final_notice_set is defined as string and yes u_notices_date is date. Because the above code is senidng email but just not setting the flag to true
