Hi Everyone, I want to hide/disable the Forecast f...
# suitescript
n
Hi Everyone, I want to hide/disable the Forecast field which is under Sales sublist based on a condition. please let me know a way to do it in Client script.
t
is your condition will be based on role/permission ?
n
Hi @Tyn Guardian,
Thanks for replying, My condition is based on a check box field present on the same form. If checked then i want to show this sublist else I don't.
t
my advise, just try to disable the controls around it. Coz when you hide the sublist, you'll have to hide the sublist item(s) as well. Then what if you have lot of items under the sublist. It will consume too much time on looping on the values
r
It may be a lot easier to ask an administrator to remove the subtab from a given form.
n
The thing is initially only I have to keep it or disable/remove it based on the checkbox. after filling the information it will be always there as the check box will always be checked when entering the information in the sublist fields
So I just want to hide it initially while filling the form first time. So want it like this, please help me here!
Is there any way to do it using Client Script 2.0?
s
You can remove the link to the sublist with something simple like
jQuery('#idosublist').css('display', 'none')
. This is assuming it has an id, you need to rightclick on it and inspect to get the id. This also assumes the id will not change later, which it could.
And then reveal it later with
.css('display', '')
r
For this particular issue I would think a WF on after field edit might be the way to go, although I haven't done this with a subtab/sublist. Unless you're locked in with a client script.
(similar)
n
okay , thanks everyone!