WebMasterSam

.Net, SEO, Dynamics CRM, AdSense/AdWords, Dating sites, Silverlight, Web hosting and more

About me

I'm an IT consultant working primarily with the .Net Framework as a developper and architect. I also work on my own on my personnal dating websites. I've been developping websites since 2000.

If you like what I do, feel free to support me

PayPal - The safer, easier way to pay online!

Bookmark

Bookmark and Share

Last comments

None

Tips and tricks when using Microsoft Dynamics CRM 4.0

When you use Microsoft Dynamics CRM 4.0 in a development project, you have to think about a lot of things that you don't
think of when doing normal .Net development. Here are some random tips and tricks to help you success in you CRM development :

1. Don't write you JavaScript code directly on the CRM. Write it on .js files.

When you write JavaScript in the ISV.Config file or on the OnSave, OnLoad and OnChange methods, the CRM starts to behave abnormaly.
Half of the time the JavaScript will simply just not be brought to the client-side.

Write .js files that you will include on your aspx pages with a HttpModule to inject script include tags at runtime inside the <head> tag.

2. Write a lot of helper classes (JavaScript)

Because barely everything you do by JavaScript in the CRM is considered a hack, the minimum you can do if you absolutely want to
use this anyway is to encapsulate that hack in some clean methods that you developpers will call. By doing this you simplify the
life of all you developpers and you have centralized methods that can be easily modified if the DOM changes (by a CRM fix or patch).

3. Never delete your entities

If you do so, and then you reimport the entity with the XML customization file, you will get some fatal errors when accessing that entity.

4. Never delete the built-in security roles

If you delete them, you will not be able to add new entities... yes the CRM must have something hard-coded in it !

5. Always use the CrmService web reference that ships with the SDK.

Never reference a custom CrmService. Also, have a common class
that can give you the CrmService web reference after setting the CrmAuthenticationToken, the URL and the credentials.
If you use your own CrmService reference you will certainly have casting problems if in some case you use the GetCrmService() method
in plug-ins. By always using the SDK CrmService web reference you will never have problems. Also, the web reference is huge (about 3MB),
so you don't want a lot of DLLs to be that size.
Posted: Apr 09 2009, 18:15 by WebMasterSam | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: CRM 4.0
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us
LINK BUILDING IS PROHIBITED ON THIS WEBSITE