File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Client-Side Components/UI Pages/Resolve Incident UI Page Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11// Below code will be used in client script of UI page as mentioned in README.md file
22
33function ResolveIncidentOnsubmit ( sysId ) { //This function is called in UI page HTML section When user clicks the Submit button
4- var rejectionReason = document . getElementById ( 'resolution_reason' ) . value ;
5- var resolutionCode = document . getElementById ( 'resolution_code' ) . value ;
4+ var rejectionReason = document . getElementById ( 'resolution_reason' ) . value . trim ( ) ;
5+ var resolutionCode = document . getElementById ( 'resolution_code' ) . value . trim ( ) ;
6+ if ( ! rejectionReason || rejectionReason === ' ' ) {
7+ alert ( 'Resolution Notes is a mandatory field.' ) ;
8+ return false ;
9+ }
10+ if ( resolutionCode == 'None' ) {
11+ alert ( 'Resolution Code is a mandatory field.' ) ;
12+ return false ;
13+ }
614 var ga = new GlideAjax ( 'ResolutionProcessor' ) ;
715 ga . addParam ( 'sysparm_name' , 'updateRecord' ) ;
816 ga . addParam ( 'sysparm_record_id' , sysId ) ;
You can’t perform that action at this time.
0 commit comments