How to disable the ui action button once it get submitted?

DINESH CHINNAD1
Giga Expert

My requirement is,

If state = "Closed", I have to show the UI Action "Re-open" button. Once the user clicks the "Re-open" button i need hide that. Because only once i need to show reopen button visible to user. The second time it should hidden.

Only once i need that Reopen button avialable the second it should be hidden

Thanks in Advance,

Thanks and Regards,

Dinesh Chinnadurai

1 ACCEPTED SOLUTION

In that case you should use a flag. Flag will nothing but just a field on your table that will not be on your form. Make it true by default and make it false once the reopen is clicked.



And the condition on reopen becomes



current.state== 'state value when it should be visible'   && current.flag=='true'


-Anurag

View solution in original post

11 REPLIES 11

Artemis15
Kilo Guru

Hi Dinesh,



You can choose a very simple solution.



  1. Create a field(true/fasle) say it actionLoader and set default value to true.
  2. Now, when ticket is closed, then show UI Action "Re-open" button with condition current.state=="closed" && current.actionLoader==true
  3. For the first time, valeu for actionLoader is true and after that you need to set this to false in your UI action script like:

                      current.actionLoader=false;



This will solve your issue.



-


Cheers,


Akash Rajput


DINESH CHINNAD1
Giga Expert

Thanks guys