How to update incident record using widget by user automatically , thats means user doesn't depend ?

1dusjhyahnt
Tera Contributor

How to update incident record using widget by user automatically , thats means user doesn't depend on servicenow developer 

means its user manually type incident number , and its will take automatically take two filed values like short description , assigned to , user want to change the value on the basic of our needs?? 

please help this is urgent

1 ACCEPTED SOLUTION

Hi @_Gaurav  , this user want another things thats code not working in widget.

 

Please mark this as helpful if this resolves your query
Thank!

View solution in original post

11 REPLIES 11

HI @_Gaurav , that's things i already know but how i will write this code thats my question buddy if you know please help me buddy thats urgent actually?? 

@1dusjhyahnt 
Please share what things are done and what is left.

 

Hi @_Gaurav 

 

i only know insertion i didn't know updation part please tell me 

@1dusjhyahnt Use this and let me know if further assistance is required

var grInc= new GlideRecord('incident');

grInc.addQuery('sys_id',input.sysid); //considering you are fetching the number or sys_id from the HTML side

grInc.query();

if(gr.next()){

grInc.description = input.description; // fetching the input in the description field from HTML

grInc.update()

}

Hi @1dusjhyahnt 
Please mark the answer as helpful if it resolves your query.
Thanks!