cancel
Showing results for 
Search instead for 
Did you mean: 
rampprakash

Show SharePoint Document Location as a Tab in Dataverse Environment

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. 

 

rampprakash_0-1639244972009.png

 

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).

 

rampprakash_1-1639245221334.png

 

Note:

 

navSPDocuments -- > SharePoint Entity Document Location (Default For All)

tabGeneral --> Tab to Display Default 

 

That's it 🙂