Always open the record view on the first tab

Hello,

Happy new year to you dear reader :-)

Is there a way to force the record view of a record to be open on a specific tab (the first one for us) instead of the current behavior (that remind the last displayed tab for this record module) ?

Best regards,

Fred

Parents
  • The active tab is stored in user cache. If you always want to force the first tab, you can customize it as part of record.js - Check the function

    /**
    * Gets the active tab in the user last state
    * @return {String} The active tab id in the user's last state.
    */
    getActiveTab: function() {
    var activeTabHref = app.user.lastState.get(app.user.lastState.key('activeTab', this));

    You can customize this function in custom/clients/base/views/record/record.js and not use the cache (lastState) - that way code will always revert to the first tab.

Reply
  • The active tab is stored in user cache. If you always want to force the first tab, you can customize it as part of record.js - Check the function

    /**
    * Gets the active tab in the user last state
    * @return {String} The active tab id in the user's last state.
    */
    getActiveTab: function() {
    var activeTabHref = app.user.lastState.get(app.user.lastState.key('activeTab', this));

    You can customize this function in custom/clients/base/views/record/record.js and not use the cache (lastState) - that way code will always revert to the first tab.

Children
No Data