Introduction:
In this Blog we will see how to display Document Location as a Default tab in Dataverse or MSCRM Envirnment.
Implementation Steps:
Consider if we have an account entity and we have configured SharePoint Integration for the Account. If we want to See the Document for Respective entity of Account, you need to Click Related to See the Document.
If Customer Expects to see the Documents as a TAB there is no OOB functionality to implement the same, to achieve that we need to write a Simple JS to Show the same.
function onLoad(executionContext){
var formContext = executionContext.getFormContext();
var sharePointDocumentItem = formContext.ui.navigation.items.get("navSPDocuments");
sharePointDocumentItem.setFocus();
var DefaultTabToDisplay = formContext.ui.tabs.get("tabGeneral");
DefaultTabToDisplay.setFocus();
}
Call the above function in Onload of the Page(in my Case its Account Entity).
Note:
navSPDocuments -- > SharePoint Entity Document Location (Default For All)
tabGeneral --> Tab to Display Default
That's it
No comments:
Post a Comment