- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 04:32 AM
Hi everybody! I would like to hide some custom tab on my task form until it reaches some states, and after make it appear on the form. Is there a way without script for do that? Or it is possible anyway? If it's possible only with script, could somebody tell me which one should I use?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:18 AM
Ahh, I see. You're actually updating the record which is re-loading the form. Your client script is not set up to run on load (2nd line of client script). If you need this to run on form load, comment out lines 2-4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:08 AM
@benn23 ok, now I see if I change manually the state the tab dissapear, but I want that it hide or appear when It changes state with a UI Action. Should I put the script in the UI Action or I have to add something in the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:10 AM
Setting it w/ a UI Action should trigger the client scripts to fire. Can you share your UI Action script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:14 AM
@benn23 here the script of the ui action:
(function(){
current.state = 127; // set the opened task state to the new one
current.update(); // update the opened task to save the changed state
action.setRedirectURL(current);
})();
as you can see it only changes the state in 127, so I think that if it changes in 127 the script should work and make the tab dissapear, should I add something in the script of the ui action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:18 AM
Ahh, I see. You're actually updating the record which is re-loading the form. Your client script is not set up to run on load (2nd line of client script). If you need this to run on form load, comment out lines 2-4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:23 AM
@benn23 ok now it works! Thank u!