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

  • Hi Frédéric

    Happy New Year to you too!

    Can you kindly share a mockup of desired view?

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi Andre,

    my customer use multiple tabs on the contact record view.

    Let's say :

    • tab 1 : the main info (date of birth etc.)
    • tab 2 : the adress info
    • tab 3 : the phone and email info

    If an user display a record, goes to the third tab, then, the next record he will display will show the third tab instead of the first one.

    My customer wants that, everytime a contact record is displayed, the first tab is displayed.

    Fred

  • Thank you for explanation.

    In a dev instance (ENT 10.2), where Contacts module has 5 tabs, I just evaluated the behavior you described.

    On accessing a Contact's record it display the latest open tab. If I select some other tab and then visit some other Contact's record the previously selected tab is displayed. If I select the 1st tab and either refresh the page or visit some other Contact's record the latest selected tab is opened.

    So it is related to user preference's settings.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • 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.