assign to field is not displaying in incident form

Fahimas
Tera Contributor

hello!! iam new to servicenow

i have created a button assign to me for incident table. that was not displaying on the form ,what can i do to overcome these?

visibility script:

              current.state=='1'&&gs.getUser().isMemberOf(current.assignment_group); 

onclick script:

function assign(){
current.assigned_to = gs.getUserName();
current.state = '2';
current.update();
current.actionRedirectUrl();
}
 
and iam also having an doubt to write the script for visiblty that the condition is the button should be visible only caller assigned to ,how can i write the script for it ?
 

 

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Fahimas 

 

Did you added that button /UI Action on Form ?

In UI action, you need to select the positions where UI action will be showed. 

Also just to let you know Assign to me is OOTB available. Give some separate name.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Fahimas 

 

Did you added that button /UI Action on Form ?

In UI action, you need to select the positions where UI action will be showed. 

Also just to let you know Assign to me is OOTB available. Give some separate name.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************