I have entity with document managment enabled CRM2011 UR12. Everyone nows that if we turn on document mangment for entity (and we have Sharpoint integrated CRM), in menu on left side of this entity will appear item "Documents". This documents
will open document managment iframe. Its nice, but I decided to put this same iframe on main form of entity. This is possible by this JS script:
function OnLoad(){
var orgName = Xrm.Page.context.getOrgUniqueName();
// alert(orgName);
var etc = Xrm.Page.context.getQueryStringParameters().etc;
// alert(etc);
var navDocument;
navDocument = document.all.navDocument;
if (navDocument != null){
//navDocument.style.display = “none”;
if (Xrm.Page.data.entity.getId()!=null){
var recordId=Xrm.Page.data.entity.getId().replace("{","").replace("}","");
document.all.IFRAME_Documents.src="/"+orgName+"/tools/documentmanagement/areas.aspx?oId=%7b" + recordId + "%7d&oType="+etc+"&pagemode=iframe";
}
}
}
Of course we have to put on form Iframe with name IFRAME_Documents
This is nice and this works fine, but one thing is annoing and cosing that this solution cant be used...
After Iframe "IFRAME_Documents" is loaded it will switch ribbon to document managmant and will disable all buttons on entity ribbon. So save, save as, close etc. is greyed-out. When i click on document on left side menu and come back to form
it become normal...
So my queston are:
Is there any possibility to enable greyed-out-ribbon by JS?
Is there any possibility to switch tabs on ribbon thrue JS?