Disable a Relationship Tab

I added a relationship to Part Item Type and I tried to disable the relationship tab in certain condition( the condition is not added to the code yet) . Relationship name ="a_Cost Data", label =" Cost Data", I am not sure which one I should use for GetTsbId(?) , tried both of them, neither works, the Cost Data tab is still enable.

The action of the method is added to the Part Form Event , Event = onLoad

Please advice


if (parent.relationships.relTabbar !==null){

function disableTab()
var showTab = false;
var tabbar = parent.relationships.relTabbar;

var tabID =tabbar.GetTsbID(" a_Cost Data");
//var tabID =tabbar.GetTsbID("Cost Data");
if (!tabID){
aras.AlertError("Cannot access Tab")
else {

Also I like to know if there is any documentation for all the Form related functions and use cases,  I  couldn't find at ARAS Programming Guide  or ARAS API references