Script to Hide Navigation Objects...
(Ex : Hiding Address Navigation from CRM Page )
Xrm.Page.ui.navigation.items.get("navAddresses").setVisible(false);
To hide the navigation items, we need the ID of the particular item which we can take with the help of Developer Tools.
How to use Developer Tools.
Sample Scenario: I need my custom entity page to hide the Activities (Navigation) after the record is saved.
Step 1: Write a JavaScript function
Step 2: Attach this function in Form Properties -> Onsave
Step 3 : Do “Save” and “Publish”.
While Opening the Form
You can see “Activities” in Navigation.
After Saving the form, our function fires and hiding the “Activities”.
Note : Working on DOM is not supported by Microsoft. So document.all will not be supported by microsoft from next release. Check this info here
No comments:
Post a Comment