File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Client Scripts/Set Severity, state & assigned to Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ //Client callable script include
2
+ var getSIRDetails = Class . create ( ) ;
3
+ getSIRDetails . prototype = Object . extendsObject ( global . AbstractAjaxProcessor , {
4
+ getDetails : function ( ) {
5
+ var sir = this . getParameter ( 'sysparm_sir' ) ; //getting the newValue of Security Inc from onChange client script
6
+ var obj = { } ; //declare an object
7
+ var gr = new GlideRecord ( 'sn_si_incident' ) ;
8
+ gr . addQuery ( 'sys_id' , sir ) ; //Query to security incident table with the newValue
9
+ gr . query ( ) ;
10
+ if ( gr . next ( ) ) {
11
+ obj . severity = gr . severity . getDisplayValue ( ) ; //Setting values in the obj
12
+ obj . state = gr . state . getDisplayValue ( ) ;
13
+ obj . assignedto = gr . assigned_to . getDisplayValue ( ) ;
14
+ }
15
+ return JSON . stringify ( obj ) ; //passing the object to client script
16
+ } ,
17
+ type : 'getSIRDetails'
18
+ } ) ;
You can’t perform that action at this time.
0 commit comments