- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2020 06:38 PM
I tried "gs.warn", "gs.error", in addition to gs.info, but no log is displayed in the application log.
Is there a solution?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 07:14 AM
So that screenshot shows the BR being an "after" BR and NOT a "display" one. Can you please change it to "display" and then show a screenshot of the "Advanced" tab as well please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2020 09:08 PM
Moving the gs.info to the top. No log is output to System log. Is BR not working?
gs.info("JC-log");
function onDisplay(current, g_scratchpad) {
var total=0;
var grid = new GlideRecord('task_time_worked'); //related list table name
grid.addQuery('incident', current.getValue('sys_id'));
grid.query();
while(grid.next()){
total+= grid.time_worked.dateNumericValue();
}
current.u_total_time_worked.setDateNumericValue(total);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2020 09:19 PM
I guess I need to be careful what I say. Switch it to:
function onDisplay(current, g_scratchpad) {
gs.info("JC - the BR is in fact running");
...and then the rest of your code
It has to be within the code block, not "at the top".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2020 09:50 PM
I modified the script, but it does not appear in the system log. Is BR not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 10:08 AM
It would seem like it is not getting executed. What table is it running on (screenshot please)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2020 07:35 PM
Running at the Insident table. The script wants the total time of "Time Work" in the related list to be displayed in the "total_time_worked" field.