Wednesday, August 11, 2010

Remove system entities from navigation area

To prevent entities customizable from getting displayed in any area we have an option in the entity customization form. But how do we achieve it for entities for which these options are not editable?

There's a perfectly simple solution to it. 
Just export the sitemap and remove the respective area from the sitemap. 
and then import the same. 

you would need to backup the sitemap for future references. 

like, 

<Area Id="SFA" ResourceId="Area_Sales" Icon="/_imgs/sales_24x24.gif" DescriptionResourceId="Sales_Description">
        <Group Id="SFA">
          <SubArea Id="nav_leads" Entity="lead" DescriptionResourceId="Lead_SubArea_Description" GetStartedPanePath="Leads_Web_User_Visor.html" GetStartedPanePathAdmin="Leads_Web_Admin_Visor.html" GetStartedPanePathOutlook="Leads_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Leads_Outlook_Admin_Visor.html" />
          <SubArea Id="nav_oppts" Entity="opportunity" DescriptionResourceId="Opportunity_SubArea_Description" GetStartedPanePath="Opportunities_Web_User_Visor.html" GetStartedPanePathAdmin="Opportunities_Web_Admin_Visor.html" GetStartedPanePathOutlook="Opportunities_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Opportunities_Outlook_Admin_Visor.html" />
          <SubArea Id="nav_accts" Entity="account" DescriptionResourceId="Account_SubArea_Description" GetStartedPanePath="Accounts_Web_User_Visor.html" GetStartedPanePathAdmin="Accounts_Web_Admin_Visor.html" GetStartedPanePathOutlook="Accounts_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Accounts_Outlook_Admin_Visor.html" />
          <SubArea Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description" GetStartedPanePath="Contacts_Web_User_Visor.html" GetStartedPanePathAdmin="Contacts_Web_Admin_Visor.html" GetStartedPanePathOutlook="Contacts_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Contacts_Outlook_Admin_Visor.html" />
          <SubArea Id="nav_lists" Entity="list" DescriptionResourceId="MarketingList_SubArea_Description" GetStartedPanePath="Marketing-Lists_Web_User_Visor.html" GetStartedPanePathAdmin="Marketing-Lists_Web_Admin_Visor.html" GetStartedPanePathOutlook="Marketing-Lists_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Marketing-Lists_Outlook_Admin_Visor.html" />
          <SubArea Id="nav_comps" Entity="competitor" DescriptionResourceId="Competitor_SubArea_Description" />
          <SubArea Id="nav_products" Entity="product" DescriptionResourceId="Product_SubArea_Description" />
          <SubArea Id="nav_saleslit" Entity="salesliterature" DescriptionResourceId="SalesLit_SubArea_Description" />
          <SubArea Id="nav_quotes" Entity="quote" DescriptionResourceId="Quote_SubArea_Description" />
          <SubArea Id="nav_orders" Entity="salesorder" DescriptionResourceId="Orders_SubArea_Description" />
          <SubArea Id="nav_invoices" Entity="invoice" DescriptionResourceId="Invoice_SubArea_Description" />
          <SubArea Id="nav_minicamps" Entity="bulkoperation" DescriptionResourceId="Quick_Campaign_Description" Icon="/_imgs/ico_18_minicamps.gif" Url="/MA/home_minicamps.aspx" GetStartedPanePath="Quick-Campaigns_Web_User_Visor.html" GetStartedPanePathAdmin="Quick-Campaigns_Web_Admin_Visor.html" GetStartedPanePathOutlook="Quick-Campaigns_Outlook_User_Visor.html" GetStartedPanePathAdminOutlook="Quick-Campaigns_Outlook_Admin_Visor.html">
            <Privilege Privilege="AllowQuickCampaign" />
          </SubArea>
          <SubArea Id="nav_internetcapture" ResourceId="Homepage_InternetLeadCapture" Icon="/_imgs/ico_internet_leads.gif" Url="/webtolead/webtolead.aspx?redirto=landingpages&amp;name=webtolead" AvailableOffline="false">
            <Privilege Privilege="UseInternetMarketing" />
          </SubArea>
        </Group>
      </Area>

To remove accounts from sales area, just delete the  <
SubArea Id="nav_accts" Entity="account" .. node from sitemap and import it.

P.S.: make sure you have a proper backup of the sitemap before editing.