Activate custom tab

Version 2020/10

// file: hooks/TABLENAME-dv.js
var dv = AppGiniHelper.DV;
var tabContact = dv.addTab("tabContact", "Ansprechpartner", "user", ["first_name", "..."]);
var tabMeta = dv.addTab("tabMeta", "Meta", null, ["created_on", "created_by", "..."]);
tabMeta.activate();

See also

Pro-Tip

Version 2020/10

You can use tab.activate() in combination with getMemberID() function for conditionally fading/hiding or activating tabs depending on the current user:

var dv = AppGiniHelper.DV;
// add more tabs here
var tabMeta = dv.addTab("tabMeta", "Meta", null, ["created_on", "created_by", "..."]);

AppGiniHelper.getMemberID(function (memberID) {
  if (memberID !== 'admin') {
    tabMeta.fadeOut();
  } else {
    tabMeta.activate();
  }
});

If current user is not admin, then fade out tabMeta.

If current user is admin, then activate tabMeta.

Do you like it?