- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 11:08 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 11:59 AM
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 12:19 PM
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 ✔️👍