I know this has been asked many times before and I have looked through many solutions but I can not get it to work!
Could someone please try and see where I am going wrong
This is the js I am saving as a webresource:
function HideTabs(executionContext){
var formContext = executionContext.getFormContext();
var tabObj = formContext.ui.tabs.get("drca");
if(formContext.getAttribute("lwa_pensionact").getValue()!=null && formContext.getAttribute("lwa_pensionact").getValue()[0].name=="DRCA"){
tabObj.setVisible(false);
}
else{
tabObj.setVisible(true);
}
}
Then I save as resource and add to solution library

Then add to the column event - on change

And add to the form event - onload

If I go back to Edit webresource I noticed the file has changed to this - is that normal?

I am getting the following error
Web resource method does not exist: HideTabsSession Id: 5e2bc000-fb8c-4790-940f-4be32cfe6aebCorrelation Id: 0b40047e-2d44-4b5d-990c-c633c598a631Event Name: onloadFunction Name: HideTabsWeb Resource Name: lwa_hidetabs
Any help would be greatly appreciated.
Thanks