incidents created today & state is in new need to change to inprogress and assigned to me(Current user) by uisng fix script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 11:46 PM
incidents created today & state is in new need to change to inprogress and assigned to me(Current user) by uisng fix script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 11:59 PM
var gr = new GlideRecord('incident');
gr.setWorkflow(false);
//gr.autoSysFields(false);
gr.query();
while (gr.next()) {
gr.state= '2';
gr.assigned_to = gs.getUserID();
gr.update();
}
Mark correct and helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2022 12:06 AM
Hi Sushmita,
You can try code below:
incidentChange();
function incidentChange(){
var gr=new GlideRecord('incident');
gr.addEncodedQuery('sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()^state=1');
gr.setWorkflow(false);
gr.query();
while(gr.next()){
gr.state= 2;
gr.assigned_to = 'your sys_id';
gr.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2022 11:47 PM
hi rahul
On Change
- If caller is VIP then
category should be network
sub category should be IP address
_ if caller is NOT VIP then category and sub category should be empty(that is cat and sub cat should be none)
how to do this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2022 12:37 AM
Hi Sushmita
You can use the onChange client script on caller field as below:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.getReference('caller_id',validCaller);
}
function validCaller(callVip){
var call_vip=callVip.vip;
if(call_vip=='true'){
g_form.setValue('category','network');
g_form.setValue('subcategory','ip address');
}
else{
g_form.setValue('category','');
g_form.setValue('subcategory','');
}
}