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

16 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

T McKeown 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.

aparna john 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

mista ben said...

Wonderful learn. I appreciate for the post.

best gadget reviews

aparna john 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....

Sharad Jain 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.

Sharad Jain said...
This comment has been removed by the author.
Ranjan Rajiv said...

Pinga solutions is the no 1 software providing company in Delhi Ncr that's providing online CRM software, payment collection software, Construction management software, construction erp with affordable price.Customer can choose and purchase online crm software,real estate software,payment collection software,Construction management software etc.
Online CRM Software

Prologic Corporation said...

This is a good article & good site.Thank you for sharing this article. It is help us following categorize:
healthcare, e commerce, programming, it consulting, retail, manufacturing, CRM, digital supply chain management, Delivering high-quality service for your business applications,
Solutions for all Industries,
Getting your applications talking is the key to better business processes,
Rapid web services solutions for real business problems,
Web-based Corporate Document Management System,
Outsourcing Solution,
Financial and Operations Business Intelligence Solution,

prologic-corp

waseem khatri 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/

Sanjay Kumar 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

Anna Kat 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.

silla 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