Most of my projects use tabs, with a tab opening each time a new app is spawned from the menu. I need to completely remove, or disable, the functionality to close these tabs via the ‘X’ that appears on the tab. I just want the tab to allow switching between apps, and apps are closed via a ‘Close’ button in the app itself. Does anyone know how I can disable or remove the ‘x’ on the tab?
More background… IE why do I want this?
Essentially users have become tired of accidentally closing apps where data changes have been made but they have not saved the changes. They need to re-open the app, find the record they changed and re-do the changes, and save it. The worst case scenario is that they become distracted (phone call etc) and forget they have not saved the record and leave the app thinking that changes have been made, but in fact they have not been applied.
To work around this issue I have implemented a framework which visually tells the user the current state of the record (unsaved) - this is all triggered via change events. Next I have implemented my own Close button - it uses the same framework to check if there are unsaved changes before closing the form. It would be nice if SC had a call to programmatically save the changes of the current record, but I have not found one. So my approach is to warn the user that there are unsaved changes and ask them to save the record. The last piece to preventing accidental closure of an app with data changes outstanding would be to prevent the user from closing the app via the ‘x’ on the tab.
To be clear, I want to retain the use of tabs (not remove them completely) - they are very useful in allowing app switching in the context of my business scenario.
I am hoping the community may have some ideas??