list of incident related scripting
						
					
					
				
			
		
	
			
	
	
	
	
	
Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
‎07-10-2024 04:25 AM
hello everyone, can anyone write the script for getting the list of incidents updated today
		
			
				
						
							Labels:
						
						
		
			
	
					
			
		
	
	
	
	
				
		
			
		
			
					
			
		
				
		
			
		
	
	
- Labels:
 - 
						
							
		
			Incident Management
 
		1 REPLY 1
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
‎07-10-2024 12:01 PM
var GetUpdatedTodayIncidents = Class.create();
GetUpdatedTodayIncidents.prototype = {
    initialize: function() {
    },
    getIncidentsUpdatedToday: function() {
        var incidents = [];
        var gr = new GlideRecord('incident');
        var today = new GlideDateTime();
        today.setDisplayValue(gs.nowDateTime());
        gr.addEncodedQuery('sys_updated_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()');
        gr.query();
        while (gr.next()) {
            var incident = {
                number: gr.getValue('number'),
                short_description: gr.getValue('short_description'),
                sys_updated_on: gr.getValue('sys_updated_on')
            };
            incidents.push(incident);
        }
        return incidents;
    },
    type: 'GetUpdatedTodayIncidents'
};
	Regards,
JP
			
			
				
			
			
			
			
			
			
		JP
