- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2023 10:55 AM - edited 08-27-2023 11:08 AM
Hi All,
Question:- If user click on Confirm Button(UI Action) and if he selects OK then incident state should should change to On-Hold and update the record and if user selects CANCEL , then Confirm Button(UI Action) should be hidden. How should I write the code in UI Action? (Confirm button is customized UI action)
Thanks in advance.....!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2023 11:31 AM
I hope you have written a client side UI action, just mention the code as below:
To hide the confirm, button you can create a flag variable on the form and set it as false by default, once it goes to else state in below code, make it true and display the UI action only if your flag variable is false
var toggle = confirm("Do You want to continue?")
if(toggle){
g_form.setValue("state","Backend_value_of_onHold_state"); // check bakcend value
}else{
g_form.setValue("flag","true")
}
g_form.save();
I hope you will get some idea how to do
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2023 11:31 AM
I hope you have written a client side UI action, just mention the code as below:
To hide the confirm, button you can create a flag variable on the form and set it as false by default, once it goes to else state in below code, make it true and display the UI action only if your flag variable is false
var toggle = confirm("Do You want to continue?")
if(toggle){
g_form.setValue("state","Backend_value_of_onHold_state"); // check bakcend value
}else{
g_form.setValue("flag","true")
}
g_form.save();
I hope you will get some idea how to do
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful based on the Impact.