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-13-2024 05:08 PM - edited 08-13-2024 05:10 PM
I guess you need to debug your script. Try:
// Update the record with the new flag value
var rslt = gr.update();
gs.info('Record update = ' + rslt);
and then check Script Log Statements to see the result. You should see the sys_id of the record being updated.
Check access to the table from the custom app.
