How do I hide one or more Tabs on a panel?

SUGGESTED

I am trying to hide tabs 3, 4, and 5 for Customer Maintenance for a specific user. I know I could set the fields on the tabs to hidden, but the user wants the entire tab to be unseen when looking at Customer Maintenance/Inquiry. I cannot delete the tabs. When I try that, I get:

  • 0
    SUGGESTED

    I'd do this with a script on the panel.  If the user is not allowed (role check), force them back to the header (invoke button).

    You cannot hide Sage default panel tabs.

  • 0 in reply to Kevin M

    As Kevin said, use a role check by using oSession.IsMember, but you don't have to use a script for each panel, you could alternatively use one post-load script on the dMain panel and use oUIObj.SetControlProperty "fldr.pStats", "Enabled$", "0" and repeat for each tab you want disabled.  You may or may not need to also have this on the AR_Customer table's post-read event in case there is some Sage 100 logic that might try to re-enable the tabs but the post-read would need to be filtered to make sure there is a UI object by checking oScript.UIObj <> 0 and if so, then use it to get the screen name to make sure it is AR_Customer.M4L.  This will make it so the tabs are disabled and can't even be clicked/accessed.  You can also try using oUIObj.SetControlProperty "fldr.pStats", "Visible$", "0" in addition to the oUIObj.SetControlProperty "fldr.pStats", "Enabled$", "0".  The Visible$ property doesn't actually hide the tab but does make it so it can't be clicked.  I'm not sure if there is actual difference between the two but it could be worth trying to avoid having to use the script on the post-read so maybe just the one script on the post-load will be sufficient.