Monday, April 29, 2013

Availability of “Add New” and “Add Existing” buttons in sub-grids

When you have a subgrid in CRM, you will notice there is an “Add New” and an “Add Existing” button. But the question is: Why sometimes only one of the two buttons is visible while some others both are visible?

image

The answer is actually not very straight forward and it depends on multiple factors:

1. Is it a 1:N or N:N relationship?

This determines the display rules of the given buttons.

 

2. On which entity?

Some out of the box entities have different display rules than others.

 

3. Is it the sub-grid of a custom entity?

Custom entities should all have the same display rules.

 

4. Is the parent lookup a required field in the child records?

This affects the visibility of these buttons. For example, if you have an 1:N relationship between Airports and Terminals then the visibility of the “Add Existing” button for the Terminals sub-grid on the Airport form depends on whether “Airport” is a required field for the Terminal or not.

 

This table summarizes the availability of the “Add New” and “Add Existing” buttons:

 

Relationship Type Is the parent required on the child (lookup field is marked as required) “Add New” button visible? “Add Existing” button visible?
1:N Yes Yes Yes*
1:N No Yes No
N:N N/A No Yes
 
* Not available on some Out-of-the-box entities
 
 
You can always modify the default behaviour by editing the ribbon and updating the display rules on the sub-grid buttons of the entity you would like to change. Before you do that, here is some useful information you might need:

When you look at the sub-grid ribbon you might find that there are two “Add Existing” buttons defined (this is true for most system entities and all custom entities): “Add Existing Standard” and “Add Existing Associated”:

image

So what’s the difference? It is misleading to believe that “Standard” is the button shown when there is an actual sub-grid inserted in the main form and “Associated” is the one visible in the associated view when using the form navigation (associated view) instead of a sub-grid. In fact, that’s not it at all. The actual difference is that “Standard” is the button that applies to 1:N relationships and “Associated” is the button that applies to N:N relationships. Therefore, depending on the type of relationship for your entity you will need to modify one button or the other. Note that some entities (e.g. contact) do not have an “Add Existing Standard” button so by default the “Add Existing” button is only available to N:N relationships.

To make your life simpler, I suggest using the visual ribbon editor which will show you all the buttons available in all entities as well as the display rules that apply.

Monday, April 15, 2013

Enterprise Data Integration Strategies with CRM 2011

In case you missed the excellent presentation by Daniel Cai in XrmVirtual about the different data integration strategies for CRM, you can view the recording here.

Data integration is a very common scenario in enterprise CRM implementations. Therefore it is important to understand what the options are and what the advantages and disadvantages are. Here is a small extract from Daniel’s presentation about 4 different data integration options:

 

1. CRM 2011 Import Data Wizard

What’s it?

  • Free utilities offered by the platform

Pros

  • Works for simple and small data import scenarios
  • Works within application, available for CRM users for self-served data
  • imports
  • Undoable
        works well for new insert, but not update though
  • Free

Cons

  • No delete
         don’t confuse with the above undo capability
  • No transformation
  • No scheduling, no automation
  • Difficult to manage incremental changes
  • Maximum number of records is constrained by file size
  • Limited capability of handling relationship
  • Exceptions to be expected when used for some special entities, fields

 

2. Custom Integration Development

How does it work?

  • Write custom code against CRM web service interfaces using SDK or service references

Pros

  • Leverage your .NET programming (C# or VB.NET) skills
  • More granular control
  • Flexible integration points
        Plugins
        Workflows
        Standalone applications (Console, Windows Form, and probably third-party apps)

Cons

  • Could be an exhaustive effort, particularly when infrastructure coding is involved
        Scheduling
        Threading
        Intricacies of working with CRM web service interfaces
  • Most likely much higher maintenance cost down the road
  • Often the case, the implementation ends up with a tightly-coupled architecture style, which leads to poor maintainability

3. ETL Tools

What’s ETL

  • Extract, Transform, Load

Pros

  • Development Productivity
  • Visual development environment for data flows and control flow tasks
  • Scheduling engine
  • Performance
  • Scalability
  • Extensibility
  • Can be part of your overall BI and data warehousing strategies

Cons

  • Learning curve of the ETL tool
  • Extra license cost of the ETL tool and/or the adapters
  • Probably not ideal solution for real-time requirements

Options

  • SSIS (SQL Server Integration Services)
  • Informatica
  • Scribe
  • Connectors for Microsoft Dynamics

 

4. Service Bus / BizTalk

What’s service bus?

  • A software architecture model used for designing and implementing the interaction and communication between mutually interacting software applications in service-oriented architecture (SOA)

Pros

  • Messaging based approach
         Optimized to move single transactions between different systems or processes in near real time or real time
  • Decoupled integration architectural model
         Best suited for decoupled heterogeneous systems by using a middleware

Cons

  • Probably not best fit with large volume data load
  • Performance overhead due to serialization and deserialization

 

Thanks to Daniel for sharing. I have also provided a Spanish translation of this post here.