We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6d88ea commit 74d4c48Copy full SHA for 74d4c48
Client-Side Components/UI Actions/Add Loggedin user as Incident assigned to/Code.js
@@ -0,0 +1,12 @@
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 == ""){
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
12
+}
0 commit comments