CRM Generic Hierarchy Child Entity Sub-Grid

From Microsoft Dynamics CRM 2015 Hierarchical Visualizations allows the end user to visualize and interact with hierarchical data in an intuitive and visual fashion across both the web and the tablet.

This is great feature where User can visualize Hierarchy. However it would have been better to apply same hierarchy functionality for Child entities of Entity on which Hierarchy is set up. For example Account has Hierarchy settings where Parent Account is lookup on Account entity. Account has one to many relationship with Cases, Opportunities, Contact etc. So User would like to see the all the Cases which are created “Under” the particular Account. Here phrase “Under” means all the Cases for particular Account and all the Cases for the Account Under this Account.

Currently CRM does have this feature available but in very limited way that too only for Account entity (Correct me if I am wrong here).

My managed solution address this problem and with few Click and Point settings (no coding involved) CRM Customizer can set up the Sub-Grid view on Parent Entity form to show all the Children that comes “Under” the parent Entity record

More details where you can download managed solution at https://generichierarchychildentitysubgrid.codeplex.com/

 

CRM 2015–Incoming emails are not getting created as Email Activity

 

If you have 2 or more Queues with same Incoming email address and if one the the Queue is Inactive then one would expect CRM Server Side Synchronization to process the email and assign it to all the Active Queues for that email address.

However actually CRM Server Side Synchronization will not process such emails and not Email activity will be created.

On CRM Mailbox, ALERTS something like following will be captured.

 

image

 

If you look into Trace logs you will find error logged as

>Crm Exception: Message: You cannot add items to an inactive queue. Select another queue and try again., ErrorCode: -2147220190, InnerException: Microsoft.Crm.CrmException: You cannot add items to an inactive queue. Select another queue and try again.

Resolution for this problem is if you do not want to use the Inactive Queue, clear its Incoming Email value and deactivate it again.

CRM 2015–Business Rules Does not work with Read-only fields

 

If you have Business Rules defined on attributes following metrics is useful

 

image

Email Smart matching–Undocumented behavior

 

If CRM has Email Smart matching enabled, then following is behavior is worth noting.

For incoming Email activity, if Case record is created out of it using “Convert to Case”, then any subsequent emails coming from same Sender having same Subject automatically gets associated with Case.

CRM–Shared Secured Field

 

Now in CRM you can share Secured Field with other Users or Team.

When a Entity has at least one secured field defined, a User get to see the option in Ribbon as “Share Secured Fields”

image

 

Clicking on Link opens a new Window where user can Add/Remove User/Team and grant permission to each individual on every secured field

 

image

 

image

Error while Export to Excel – The data has invalid column headings, so you will not be able to re-import it

If you get to see following error message while export to excel, check if you CRM View has two or more columns with same display names. Once you remove it error will go off.

image

HTH

Error: Your subscription has the maximum amount of storage available. To obtain additional storage, please contact our sales organization.

 

We received following error on CRM 2013 On-premise deployment.

image

 

From message it looks like this error is for CRM 2013 Online clients, where each subscription has storage limit and when this storage limit is approaching CRM Admin gets email so that they can pro-actively get more subscription space. However it does not make any sense for CRM On-premise.

This error basically comes when Database drive space is full and has not more space, so either we have to shrink the database or get more disk space.

CRM 2011 & CRM 2013–Usage Audit Report (On-Premise Deployment)

For On-Premise deployment of CRM 2011 or CRM 2013, I have written a SQL Query which will give details about who when accessed the CRM and what was his/her role in CRM
CRM does have a Audit Summary View which let you see this details but you cannot export this data from CRM Audit Summary entity neither can you have carts/graphs around that data in CRM Report.
Here is script, run it as db_owner on CRM Database. You can also write SQL Connection in Excel and pull this data dynamically.

SELECT Usage.*

,(SELECT SecRole.Name +‘,’FROM SystemUserRoles SysUser

INNERJOINRole SecRole ON SysUser.RoleId = SecRole.RoleId

INNERJOIN SystemUse SU ON SysUser.SystemUserId = SU.SystemUserId

WHERE SU.DomainName = Usage.UserName

FORXMLPATH ())AS SecRoleNames

FROM

(

SELECT U.fullname AS [FullName], U.DomainName AS [UserName]

,DATEPART(YYYY,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))AS [Year]

,DATEPART(MM,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))AS [Month]

,DATEPART(DD,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))AS [Day]

,COUNT(*) [Counter]

,MIN(DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn)) [FirstAccessAt]

,MAX(DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn)) [LastAccessAt]

FROM AUDIT A

INNERJOIN SystemUser U ON A.objectid = U.Systemuserid

WHEREAction= 64

GROUPBY

U.fullname, U.DomainName

,DATEPART(YYYY,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))

,DATEPART(MM,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))

,DATEPART(DD,DATEADD(HH,(DATEDIFF(HH,GetUTCDate(),GetDate())), A.CreatedOn))

) Usage

Hope you find this script handy.

CRM 2011–Generic Rollup Solution

Project Description

Many time we need to do the Rollup of certain child attribute data into parent attributes. For example number of Contacts for an Account or total order for order lines etc.

The best way to achieve this rollup is using CRM Plugins, however for each Rollup on each entity we have to write separate plugin which will take care of local attributes and type of aggregation required.

This Generic solution is meant to address this problem. It has generic code which works with configuration stored in CRM and can be applied to any entities.

This Generic Solution servers following purpose

1. It rollup data

2. Aggregation is done terms of Count, Average and Sum

3. A single Plugin Code is used for all the Entities.

4. Aggregation is completely configurable without any code change.

5. Aggregation changes in based on metadata.

How to configure Generic Rollup?

  1. Import the Managed Solution provided with this Project.
  2. If Settings does not reflect the entity link for “Rollup Configuration” entity, modify the customization to add the link to Settings (or any other Group).
  3. Create new record for “Rollup Configuration” entity
    1. At first enter the Child Entity Name and the type of aggregation and Save the Record (Do not close the Form)
    2. Once the record is saved under Rollup Config tab, enter the Configuration as follows
      1. Child Entity Entity Logical Name: this field will be auto populated based on what you have entered on main form.
      2. Child Entity Aggregate Attribute Name: This is the attribute from Child entity on which aggregation needs to be done. Note if aggregation type in Count then select the last items from this list which is PrimaryKey attribute name from Child Entity.
      3. Parent Entity Name (Lookup Attribute): This Dropdown contains all the Entities which has One-To-Many relationship with Child entity. Select Entity to which you want to update the aggregation results.
      4. Parent Entity Aggregation Attribute Name: This is attribute from Parent entity to update aggregation results.
    3. Hit Save once selection is completed and you are done !!!

image

 

What happens behind the scene?

Once you import the solution it also imports 3 plugin SDK Messages Processing steps, namely for Create, Update and Delete. These Plugin messages are configured to triggered on All the entities in CRM. Whenever the record is Created, Updated or Deleted this code checks whether rollup is configured for the entity. If yes it reads the configuration and calculates the aggregate values and updates it in Parent entity.

 

By default plugin will be triggered on all the entities irrespective of whether rollup is configured to entity, this can cause a performance problem. So in order to avoid Plugin triggering each entity, you can configured this messages separately for only those entities which need Rollup. This is extra admin steps that needs to be done, but it can give better performance.

Please try out the solution and let me know your feedback.

 

CRM Managed Solution is available on CodePlex

%d bloggers like this: