State's value on the incident form disappeared after changing state to close and save

Alon Grod
Tera Expert

Why that after Im changing incident's state to closed and save, the state's value field is being empty ?
When I do 'show xml' I do see that the state has a value but on the form its empty

Screenshot 2023-11-16 at 21.07.47.png

1 ACCEPTED SOLUTION

Please check if you are admin or member of HamalGroup then you can see the state value 7 ( Closed ) otherwise third [ else ] condition is removing state = 7. 

 

 

AshishKMishra_0-1700164350272.png

You can comment the else part and test it again.

 else {
    // g_form.removeOption('state', '7'); //assuming 7 is closed state value
 }

-Thanks,

AshishKMishra

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

5 REPLIES 5

Hi @Alon Grod 

 

I am assuming you’ve admin role but check the value you’re getting in your answer.

 

as you are using if condition to check if answer == ‘admin’, seems it’s failing and your code is going to else statement every time which is removing the closed state option from your state field.

 

Use alert to check the answer.

 

Thanks!

 

Please mark this response as correct and helpful if it works ✔️👍