30 June 2013

Orchard CRM - The Application Design.

The design is simple: Use Orchard as the host system to manage user access, web site content etc.
and then adding a custom module to integrate with Dynamics CRM.
This approach can be used in many scenarios where you want to integrate the existing portal website and a back-end system. In this case, the back-end system is Dynamics CRM, and the front-end system is Orchard CMS.

Mapping is the key

You can mapping an portal user to many CRM records types if you like, i.e. Account, Contact, User, Team etc. Most commonly, as we are doing here, mapping to a Contact record in Dynamics CRM. Like other systems, an authorised Orchard user has an unique and read-only ID, which will be used to identify if this user is in CRM or not. In my sample code, the Orchard identifier is: _orchardServices.WorkContext.CurrentUser.Id.
The mapping field in CRM is ‘externaluseridentifier’ which is a system attribute in the Contact entity (the only reason I choose this field is because it's out of box, good for the demo purpose). You can also use your custom identifier to mapping a Orchard user and CRM contact record, but make sure this field and value shouldn't be modified by CRM users.

The following diagram shows the overall structure of how it works.
Orchard CRM - How It Works

MVC is the core

The custom module calls DynamicsCRM in my sample code, it's an undecorated MVC application (99%) with some Orchard-specific features (1%). I say it's undecorated, because you don't need to write any CSS code etc. The custom module can inherit look&feel from the host theme by simply declaring an Orchard class [Themed] in the controller.

The advantage is obvious: First of all, you can focus on the core-functionality development and leave the rest of work to Orchard. Secondly, the core MVC code can be reused elsewhere, i.e. you can use it to develop a portal app for SharePoint public facing website etc.


The following diagram shows the MVC core function in the DynamicsCRM module.
DynamicsCRM module - MVC Core
The rest files are mostly Orchard specific and really easy to understand.

Here's some links for this solution:
DynamcisCRM module (with sourcecode) for Orchard CMS
Orchard CRM portal demo
Previous articles about Orchard CRM:
Microsoft Dynamics CRM and CRM Portal website
Orchard CRM - A concept of Dynamics CRM Portal Solution


Cheers,
Jim Wang
June 2013

21 comments:

Microsoft Dynamics said...


This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??
Dynamics crm training

Microsoft Dynamics said...

Recently, I did not give lots of consideration to leaving responses on site page reports and have positioned responses even less. Reading through by way of your enjoyable article, will assist me to do so sometimes.
Dynamics AX training

Microsoft Dynamics said...

This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??
Dynamics training

Unknown said...

Question, we have custom address entities, these address entities have obvious attributes like Address1, Address2, City, State, Zip etc... On the account entity we have a lookup attribute that points to the primary address. One thing I don't understand is that we use workflows to copy the address attributes to the account entity so the address information can be displayed on the account record in the UI. I don't like this approach as we have too many workflows running and the essentially duplicate data. We do this for phones also. What are your thoughts? My suggestion is to use javascript/jQuery to load any custom info and display on UI.

Unknown said...

Hi,The entire process of website development is in a phased manner, thereby minimizing any Web Design Cochin possibilities of any disparity while developing your website. Assembling a website is an one-of-a-kind blend of publishing, user interface design, and technology. Thanks...........

Shai said...

Hi Jim,

Your Demo site is not working.
When you try to log to My cases for example (after logon) I get the error:
OOPS. SOMETHING WENT WRONG ... SORRY

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back.

Also when trying to add the module to my site , I'm getting error.

Please advise
Shai

Unknown said...

Wonderful learn. I appreciate for the post.

best gadget reviews

Unknown said...

Hi,Business decisions can be made on personal relationships above other factors, and this stresses with Incorporation in Qatar the importance of the correct etiquette.Thanks....

Unknown said...

Such a good and helpful information for online crm software Service. Online crm software, Online Customer Relationship Management, CRM, sales automation, Contract management CRM. Thanks For sharing with us and keep share more blogs for us.

Unknown said...
This comment has been removed by the author.
Unknown said...

Such a good and helpful information for online crm software Service. https://www.scratchmap.org/the-ultimate-gift-solution-for-those-that-are-hard-to-buy/

Sk said...

Wonderful, i would like to big thanks for sharing such more useful articles for us. lastly i appreciate for this post.sales contact management software

BadWolf said...

I agree with Shai. Your dem o site doesn't work and I can't run it on mine either. It returns an error for the connection string and I have tried every possible way to write it. Please help.

Anonymous said...

Hi Jim

hope all is well

keep getting the following error when i click case after sign-in.

Oops. Something went wrong ... sorry
An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back

kindly assist

Unknown said...

Keep up the fantastic piece of work, I read few blog posts on this web site and I believe that your site is real interesting and has lots of great information. ERP Software in Mumbai || System Software || CRM Software in Mumbai || MLM Software

Unknown said...

I really appreciate spending some time to talk about that, I believe firmly regarding this and so really enjoy understanding more about this kind of subject.This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this. CRM Software || MLM Software in Mumbai || ERP Software || System Software in Mumbai

Anonymous said...

Thanks for sharing this post Dynamics AX Online Training | Sharepoint Online Training | Microsoft Dynamics AX Training

Unknown said...

Dich vu ke toan ACB là thương hiệu lớn tại HCM chuyên cung cấp các dịch vụ kế toán chuyên ngiệp uy tín giá rẻ nhất thị trường. Nhằm tri ân khách hàng, ACB khuyến mãi gói hợp đồng làm dịch vụ kế toán trọn gói lên đến 50%. Để biết thêm chi tiết :dịch vụ kế toán,dich vu ke toan Lầu 4, Tòa Nhà Long Mã, 602 Cộng Hòa, P 13, Q.Tân Bình, HCM Hotline: 0966660888

Carol William said...

Nice post. Thank you for sharing such a great information about Orchard CRM - The Application Design.

alps mlm software said...

Thanks for sharing this piece of content. If you are looking for MLM Software Company and want to discuss your new MLM business startup.
Contact us +91-9891537260, +91-9311363701
Email Id: - info@alpsmlmsoftware.com
MLM Software India

alps mlm software said...

Thanks for all the tips mentioned in this article. It’s always good to read things you have heard before and are implementing, but from a different perspective, always pick up some extra bits of information. If you are looking for MLM Software Company and want to discuss about your new MLM business startup.