Sage CRM 2020: Hiding a tab with an SQL Clause

Sage CRM offers the ability to control the user interface through security rights and permissions granted through the user profile.  But it is also possible to dynamically change the interface just based on the data. 
You may wish to hide a tab based on the value of a field contained in the record.   For example, if the company that user is looking act does not have a service level agreement then the 'Cases' option in the tab menu should be hidden.




In the above picture you can see that the SLA status is blank (null) and you do not see the Cases option from the choices above.

By changing this drop down value (to what ever option) you can now see that the Cases option has been restored.
This was implemented by using a little code in the SQL textbox of the Cases tab menu definition screen. Look at the picture below, this will help explain.



If you go to Administration - Customization - Company - Tabs - Company you will get to the screen shown above. You can then select the Cases option in the large list box that is on the left side of the screen. With this selected the Properties change to reflect the Cases tab. Paste into the SQL text box the following code.

comp_slaid is not null

Then you must click Update then Save to make your changes stick. Your Cases tab will not only show if the SLA drop down is left null.

If you want to learn more about using the Tab SQL Clause to control the user interface then please see:
Anonymous