File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Client-Side Components/UI Actions/Add Loggedin user as Incident assigned to Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ > ** UI Action**
2+ When a new Incident record is created, user can come to incident ticket and assigned to themself. Once they click on UI Action.
Original file line number Diff line number Diff line change 1+ var currentUser = gs . getUserID ( ) ; //Getting loggedIn User Id
2+
3+ //Checing wheather user is available or not in Assignee field
4+ if ( current . assigned_to == "" ) { //checking assigned to is there or not
5+ current . assigned_to = currentUser ; //Setting the current loggedIn user
6+ current . update ( ) ; //updating the record.
7+ gs . addInfoMessage ( "Incident has been assigned to You." ) ;
8+ action . setRedirectURL ( current ) ;
9+ } else {
10+ gs . addErrorMessage ( "Incident is already assigned" ) ;
11+ action . setRedirectURL ( current ) ;
12+ }
You can’t perform that action at this time.
0 commit comments