Wednesday, March 28, 2012

Debugging in IE 8 and 9 for CRM 2011

Press F12 in IE 8 and 9.

For Java script debugging  in IE9 press F12

Before start debugging please Enable Script Debugging first.

Open an IE browser and make sure in:
Tools - Internet Options - Advanced - Browsing
Disable script debugging (Internet Explorer) is unchecked

For More help
IE 8 JavaScript Debugger
http://msdn.microsoft.com/en-us/ie/dd699458
IE 8 JavaScript Profiler
http://msdn.microsoft.com/en-gb/ie/dd490714
IE 9 Developer Tools
http://msdn.microsoft.com/en-gb/ie/hh545573


Thanks

Tuesday, March 27, 2012

CRM 2011 Privileges in Sitemap Hiding

Hiding Settings and Resources from sitemap for all the users except Administrator, System Customizer.
We could not edit sitemap directly on security privileges for this purpose we use a small trick.
We will follow these step to accomplish our task.
1) Create a new entity
2) Give read access to administrator and system customizer role
3) Download SiteMap.
4) Edit SiteMap add this line
<Privilege Entity="account" Privilege="Read" /> I will explain this below.
5) Upload again The Site map.



Let Start.
1) Create a new entity and name it RoleHideSettingsResource. (new_RoleHideSettingsResource).
2) Give read access to Administrator and customizor (Check any other user dont have read privilege to this entity.
by Default only Administrator and customizor has the read privilege.
3) Download the site map using this tool sitemapeditor. Its very easy to use

4) Click on Save SiteMap (sitemap.xml)
5) Open the SiteMap in any editor Tool ( I am using visual web developer)


6) NOW THE MAIN PARTS COMES Locate tag

 <Area Id="Settings" ResourceId="Area_Settings" ShowGroups="true" Icon="/_imgs/settings_24x24.gif" DescriptionResourceId="Settings_Area_Description">


7) Under every <SubArea> add this line
 <Privilege Entity="new_RoleHideSettingsResource" Privilege="Read" />

8) Your first Area looks like this
<Group Id="Business_Setting" ResourceId="Menu_Label_Business" DescriptionResourceId="Menu_Label_Business">
      <SubArea Id="nav_businessmanagement" ResourceId="Homepage_BusinessManagement" DescriptionResourceId="BizManagement_SubArea_Description" Icon="/_imgs/ico_18_busmanagement.gif" Url="/tools/business/business.aspx" AvailableOffline="false">
        <Privilege Entity="new_RoleHideSettingsResource" Privilege="Read" />
      </SubArea>
      <SubArea Id="nav_template" ResourceId="Homepage_Template" DescriptionResourceId="Template_SubArea_Description" Icon="/_imgs/ico_18_templates.gif" Url="/tools/templates/templates.aspx" AvailableOffline="false">
        <Privilege Entity="new_RoleHideSettingsResource" Privilege="Read" />
      </SubArea>
      <SubArea Id="nav_productcatalog" ResourceId="Homepage_ProductCatalog" DescriptionResourceId="ProductCatalog_SubArea_Description" Icon="/_imgs/ico_18_productcatalog.gif" Url="/tools/productcatalog/productcatalog.aspx" AvailableOffline="false">
        <Privilege Entity="product" Privilege="Read" />
        <Privilege Entity="new_RoleHideSettingsResource" Privilege="Read" />
      </SubArea>
    </Group>

9) Save the file
10) Click on open siteMap
 11) And Than Update SiteMap


Conclusion:
Now only Administrator and system customizor could see Settings and resource center tab.
Thanks and if you need some more help please comment here.