Hi Mithun,
that´s an interesting use case. I assume you need a combination of the onFormPopulate Method with an onChange/onClick Method.
I made a very quick&dirty test to disable a tab on button click:
var rel_dom = parent.relationships.document;
var relId = "6B5481B4B83A48CBA0C958ECD5407B12"; // id of RelationshipType
var style = "display: none;";
var tab = rel_dom.querySelector('li[data-id="' + relId + '"]');
tab.setAttribute("style", style);
// todo: select another tab if disabled tab is active.
return;
This one just disabled the tab. But the tab content itself of course still will be visible when users already selected the tab. But I assume it should be possible to automatically switch to another tab. Would be cool if you could share your results!