Friday, May 18, 2012

The Extensibility Model of Microsoft Dynamics CRM

The extensibility platform is the best feature of Dynamics CRM and Dynamics CRM online. The application that we develop is on the top of this platform dynamics CRM support two type of deployments Dynamics CRM (on-premises) and CRM online(Hosted). Dynamics CRM has a security model that protects the platform from unauthorized access on the web.
Every application that developed for Dynamics CRM server is uses Web service to communicate with the xRM platform layer. Microsoft Dynamics CRM uses a metadata driven architecture to provide the flexibility to create custom entities and additional system entity attributes and also make upgrades and transportation of solutions easier.
We can control access to data through security using xRM platform, controls access to the database, and raises events for workflow processes and custom business logic implementations (plug-ins). The platform layer provides for both incoming and outgoing email processing though Microsoft Exchange Server.

 WCF Web Services

Microsoft Dynamics CRM uses web service interface to interact with CRM data, meta data and with platform services, The web services are based on Windows communication Foundation (WCF). We could use write application and tools with the help of these web services. For more information about Web services, see Write Code for Microsoft Dynamics CRM (Web Services). For more information about Web services, see the .NET Framework Developer Center. You can also read the article XML Web Services Basics.

Processes (Workflows)

Most of us are familiar with workflows in 4.0 but in 2011 Microsoft introduces processes. Which include two categories workflows and dialogs. Processes are used to create and execute custom business processes. As you can see in the above picture process are on top of WWF. We can write custom process activates (.Net assemblies). For more information about processes, see Processes in Microsoft Dynamics CRM (Formerly Workflows).

Plug-ins

Microsoft gives us extension to perform custom business logic. You can implement your business logic not just with the help of workflow process but also with the help of Plug-ins
Plug-ins support an event handler interface that is based on a pipeline execution model. The pipeline model allows for event handlers, also known as plug-ins, to be executed before or after the core operation of the system. When an action occurs caused by user interaction with the Web application or a Web service call, the platform checks for registered event handlers. If a handler is registered for notification, the platform executes a well-defined event handler method, passing it run-time information. For more information, see Plug-ins for Extending Microsoft Dynamics CRM.

Client Application Extensions

MS CRM has a very power client application extensions. We could implement customization and all the client programming code is stored in the MS CRM database. This makes easy to import and export the code from developemt enviorment to production enviorment.
Reporting
Using SSRS and built in report creation functionality we could develop complex reports.
There are two catagrioes of reports
1.      SSRS
2.      Fetch XML
We could directly export our report for Excel and access.

Dynamics CRM learning resources

Saturday, April 14, 2012

Top Five Best Tools for Dynamics CRM 2011


Daily we interact with a lot of Tools that we will use in Dynamics CRM. I am going to list some of them that will helps you to make more productive and enrich your application.
1. SiteMap Editor
Thanks to tanguy for this great tool. SiteMap Editor Helps you to easily edit and customize your Site Map navigation URL. You could add descriptions, SubArea, Titles. You could delete any Workplace, Group or sub area. You could reset your sitemap definition to default.

Almost every company needs Ribbon Editing. But Visual Ribbon Editor makes it a lot easier to Edit any Ribbon Button. Its UI is very easy. You could give ID, Labels, Thumbnail Image, Javascript Actions, and Enabled rules.


3. Role Updater
Some users say it crashes every time but for me it works perfect all the time. If you need to write a new role in CRM you will get stuck after watching a lot of options available there for this purpose CRM teams always suggest you to copy any existing role that matches your current requirement. But Role Updater solves this problem if none of the role matches your existent role than you could use Role Updater. Its easy and simple to use.



4. Diagnostics Tool
This is heaven for some developers. This tool is used for tracing. This tool gives a complete detail of errors on CRM server, it also generates a report about Deployment and any error in HTML format.



5. Solution Import
Import Solutions in just one click


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.

Wednesday, February 15, 2012

CRM 2011 - Form errors when opening non customised forms (object doesn't support property or method 'Form load')

You may experience the following error across a number of default entities after installing CRM 2011 on a new server. The errors occur despite having made NO customisations:
There was an error with this field's customized event
Field: window
Event: onload
Error: object doesn't support property or method 'Form load'
Within a fiddler trace, you may see the following:
401 http://<crmserver>/<myorg>/%7B634443390830000000%7D/WebResources/Ribbon_main_system_library.js
404 http://<crmserver>/<myorg>/%7B634443390830000000%7D/WebResources/Ribbon_main_system_library.js
When a Web Resource is requested from the CRM server, a URL is built dynamically. For that, CRM uses a component (that gets installed with CRM) called “Microsoft URL Rewrite 1.1 for IIS 7”, together with a rule that you can see inside the CRM Web site configurations under the URL Rewrite section called “WebResourcesRule”.
It has been seen that in some circumstances the Microsoft URL Rewrite Module does not get loaded properly and/or the rewrite rules are missing. The following can be done to check this:
1)
-Launch IIS Manager on the CRM server
-Select the CRM Website
-Double click Modules under IIS heading
-Verify RewriteModule is listed in the list here and is associated with the following DLL: %SystemRoot%\System32\Inetsrv\rewrite.dll
2)
-Launch IIS Manager on the CRM server
-Select the CRM Website
-Double click URL Rewrite under the IIS heading
-Verify that 3 rules exist here (ClientGlobalContectRule, WebResourcesRule, FederationMetadataRule)
If one or both of the above does not appear correct, then you should perform the following:
A) Make sure that Kernel-mode authentication is enabled:
-Launch IIS Manager on the CRM server
-Select the CRM Website
-Double click Authentication under the IIS heading.
-Select 'Windows Authentication'
-Click on Advanced Settings in the right hand Actions pane.
-Confirm 'Enable Kernel-mode authentication' is marked.
B) Repair or Reinstall the URL RewriteModule:
- The installation msi for the Microsoft URL RewriteModule can be found within the CRM server installation media under a folder called UrlRewriteModule. The file is called rewrite_1.1_amd64_rtw.
- Reboot the CRM Server after reinstalling the module.
When the module is correctly installed, the CRM website web.config file should be automatically updated. To verify this open the CRM website web.config file and make sure the following element is present under <rewrite>.
</security>
<rewrite>
<rules>
<rule name="ClientGlobalContextRule" stopProcessing="true">
<match url="/?([0-9a-zA-Z][^/]*)?/?((?:%7b|\{)[^/]*(?:%7d|\}))?/?(WebResources|Handlers)/ClientGlobalContext.js.aspx" />
<action type="Rewrite" url="/{R:1}/_Common/ClientGlobalContext.js.aspx" />
</rule>
<rule name="WebResourcesRule" stopProcessing="true">
<match url="/?([0-9a-zA-Z][^/]*)?/?((?:%7b|\{)[^/]*(?:%7d|\}))?/?webresources/([^\\?]+)" />
<action type="Rewrite" url="/{R:1}/Handlers/WebResource.ashx?name={R:3}" />
</rule>
<rule name="FederationMetadataRule" stopProcessing="true">
<match url="FederationMetadata/2007-06/FederationMetadata.xml" />
<action type="Rewrite" url="/Handlers/FederationMetadata.ashx" />
</rule>
</rules>
</rewrite>
</system.webServer>

Microsoft URL Rewrite Module 1.1 for IIS 7 (x64) can be downloaded from below:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16784

Best Regards
Mubasher Sharif