Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>**UI Action**
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
@@ -0,0 +1,12 @@
var currentUser = gs.getUserID(); //Getting loggedIn User Id

//Checing wheather user is available or not in Assignee field
if(current.assigned_to == ""){ //checking assigned to is there or not
current.assigned_to = currentUser; //Setting the current loggedIn user
current.update(); //updating the record.
gs.addInfoMessage("Incident has been assigned to You.");
action.setRedirectURL(current);
} else {
gs.addErrorMessage("Incident is already assigned");
action.setRedirectURL(current);
}
Loading