Monday, 8 December 2014

Microsoft Dynamics CRM e-book: Personal Dashboard for End Users

Hi,

Recently, I have requirement to conduct training for end users about Personal/User Dashboard, so I tried to create an e-book and I would like to share my thought, knowledge, and training material here.

Just in case in the future we have another training so that I hope this can be useful for you.

Overall, this e-book will help you to:

*As Trainer/Partner:
- Provide e-book for customers
- Use it as Training Material
- Improve knowledge

*As End Users:
- Learn how to create, customize, configure, and manage Personal Dashboard in Microsoft Dynamics CRM
- And not only Dashboard, but also how to Create New Personal View and New Personal Chart
- How to put and mix it together and build this into a meaningful Data Analytic Tool

This e-book is in full color and full visualization edition which I hope can help you to get the core essence.

And here we go..



Download source: Click Me!

Thank you for Microsoft and another blog references.

Thank you all!

Monday, 1 December 2014

How to Update Activity Entity Record When Completed/Canceled Using CRM SDK C#

As we know, in the activity entity, after you completed or close/canceled an activity record, you cannot modify any value of this activity record. Well, it happened to any entity and you might need to re-open it first. But, sometimes, you need to update some fields when you cancel or complete activities, such as you want to give additional description, you want to save field based on the regarding field, or you want to add some calculation inside when you close any activities.

So, here we are, this is the code to update field when you close the activity, you need a plugin.

public void Execute(IServiceProvider serviceProvider)
        {
            #region must to have

            IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

            IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));

            // Create service with context of current user
            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

            //create tracing service
            ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            #endregion

            string strStatus = string.Empty;

            if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
            {

                //create entity context
                Entity entity = (Entity)context.InputParameters["Target"];

                if (entity.LogicalName != TFP.Xrm.Contoso.Task.EntityLogicalName)

                    return;

                try
                {
                    if (entity.Contains("statecode"))
                    {
                        //Update the description
                        strStatus = GetStateCodeText(service, entity.LogicalName, "statecode", 
                            ((OptionSetValue)entity["statecode"]).Value);
                        
                        //update the description field
                        entity["description"] = String.Format("{0} on {1}", strStatus, DateTime.Now.ToString("dd/MM/yyyy"));
                    }
                }
                catch (Exception ex)
                {
                    throw new InvalidPluginExecutionException(ex.Message);

                }

            }
        }



The most notable is this line:
if (entity.Contains("statecode"))
{


}

You can have your own logic, in my scenario is I want to update the description field in Task entity to capture the status (in text) + the time, I am sure that you guys have your own scenario Smile, for example update another field based on the status and so one.

And the most important thing is you need to register this plugin onPreUpdate

image

Result:

image

See the updated Description field below.

image

Hope this helps!

Thanks.

Thursday, 27 November 2014

CRM 2015: How to Configure & Customize Hierarchy Relationship for Custom Entity

In the previous post, I was explaining about Hierarchy Relationship in CRM 2015, as we know we can have now I am explaining how to Configure the Hierarchy Relationship Setting for Custom Entity.

Let’s Get Started

Now, let’s configure it!

Create a Custom Entity

Let’s create a custom entity, I create a custom entity, so-called as ‘Project’

image

Create New Fields

To make this scenario more complex and interested, let’s we create additional fields, such as Project Amount and Customer (Account). Thus, we can use those fields to show in the form.

Create the Relationship

Now, create the Relationship and make sure it is a self-referential relationship, it means that a relationship with Primary entity and the Child entity are the same entity.

image

And make sure you set the Hierarchical to ‘Yes’, it is very important.

Configure the Hierarchy Relationship

Now, go to the next setting, there is ‘Hierarchy Settings’ and Create New.

image

Now it will open a new windows allowing you to create only one new Hierarchy Setting and you are required to give name and choose default Quick View Form, if you don’t have this Form, then you should create at least one Quick View Form.

image

Create the New Quick View Form

Put the important fields into the Form.

image

Save it.

You can create more than 1 Quick View Form, but you need only one default form.

image

*Remember in this post, we can only display 4 fields shown in the each diagram shape block, to display more info you can achieve this by switching the Form, so we need to create multiple Quick View Forms to achieve this and choose one as the default.

Save it.

And check this:

image

It should show ‘True’.

Do not forget to Save and Publish All Customizations

image

Create the Sample Data

After you published, it is the time to create the hierarchical data, before that make sure you have configured all the important fields in to the Main Form.

After you create several data with parent-child relationship enable, you can see the View Hierarchy upon you saved it.

image

View All Data

image

See the Result

Now, let’s see the visualization.

image

You can see the hierarchy of the Project in each record perspective, either from the top one, the middle level, or the lowest level, you can select and jump to another related record in line.
In the left side is the tree view which you can Expand and Collapse.

In the Center is the Hierarchy Diagram.

And if you select the record, as usual plus contextual it will allow you to perform some actions defined in the Ribbon/Command Bar

image

Well, it is a nice visualization from Out of the Box functionality, now I want to make it more beautiful by adding pictures.

How to Show with Picture?

First of all, you need to enable the Entity Image that was first time introduced in CRM 2013.
Go to the Entity detail and enable the Entity Image by creating a new image field.

image

And go to the Form display properties

image

Check the ‘Show image in the form’ checkbox

Save it and do not forget to publish it.

And Now you should add the Image, in this example is the image of the Project Manager, update your data and get back to see your result.

Visualize your Data with Diagram plus the Picture, it means 1000 words!

image

image
image

Hope this helps you!
Thanks.

Let’s Getting Closer with CRM 2015: Hierarchical Relationship

CRM 2015 has been launched allowing us to try! Thanks to Andre Margono, my friend that keep me updated Smile

Interested to try something new related to Hierarchical Relationship (don’t be confused it is not the Hierarchy Security Model), Today, I want to explore one of the features, the Hierarchy Relationship.

As introduction, you can refer to these links:


And here is my report..

What is the Hierarchical Relationship feature that just has been introduced by Microsoft on Microsoft Dynamics CRM 2015?

Hierarchical Relationship is a new feature for Microsoft Dynamics CRM, first introduced in Microsoft Dynamics CRM 2015 version. This feature is definitely one of the great enhancement built by the Product Team that we have been waiting for long ago.
This feature basically visualize the parent-child relationship records in to a beautiful visualization instead of viewing in a flat list of records. Which you can have its benefit out of the box without additional cost.
And in term of Out of The Box, now let’s exploring what can be done and what can’t be done.

What does it look like at a glance?

Let’s we sneak peek at a a glance to see this visualization looks like.

image

You can see also in term of Child perspective.

Which you can jump to another related record easily.

image

And…another picture I will give after we go through next sections Smile

What are the Benefits?

It helps users to understand more the hierarchy through a beautiful visualization, it can be useful for some cases, for example:

1. You have MLM-mode hierarchy for Partners or Individual Users that you stored in User, Account, or Contact entities and now you want to see the schema of the hierarchy relationship, so you don’t need to build any custom report to see this record is under which parent record and having how many children.

2. You can see the visualization of the Position Hierarchy and Reporting Line Hierarchy in term of Organization Business Reporting Line, so have you set the hierarchy correctly? You can check easily.

3. You can see the visualization in the perspective of the Top Parent, mid level, or the lowest level (shown in the previous pictures).

4. You can jump record by record and drill down to another record in the same hierarchical line easily.

image

5. Its visualization can help you to see the overview and summary of the records with specific very important information shown in the visualization.

6. If you set the quick view form properly, you can combine its feature with rollup field + calculated field features to be shown in the visualized chart to help high-end-level users to see the value of parent and the child records.
For example: Revenue, total Employee, total Budget, etc.

7. In the visualization you can also select the records that you want like what you usually do in the entity main grid view records and you can perform next action defined in the ribbon, like out of the box actions: Run Workflow, Run Report, Share, Assign, and your own custom ribbon as well.

image

8. And..the best thing is you can feel those benefits through Out of The Box Smile

What entities can support?

Hierarchical Relationship can be set for selected Out of The Box Entities + Custom Entities.
So far I checked until I post this post, Here is the list:

image

What are the other limitations?

Beside only applicable to those entities, there are limitations that you need to understand at the very first place (before you talk and promise to the customers of course Smile)

1. This is only applicable for 1:N Relationship, not for N:N Relationship because it is hierarchy setting not a free flow relationship setting, and unlike the relationship chart produced by other parties utilizing connection in CRM.

2. This feature is only applicable for self-referential, it means not applicable to show relationship from another entity.

image

It means you cannot use to see relationship across different entity, for example: Account and Primary Contact, Contact and Company Name (only Contact with Company Name linked to another Contact, not Account that can be shown).

Another example, let’s say previously you was customizing the Account and link to Custom Entities, for example: Supplier, Vendor, Main Group, etc, you cannot see the visualization of those linked Account records, so that basically before you did customization, always think carefully it is correct or not using Custom entities instead of using Account or Contact.

3. You can only see the Visualization in the Entity View, it means you cannot show through view you got from the Advanced Find result nor through Dashboard to show all full hierarchy visualization

image

And you cannot see the icon image through Advanced Find result.

 image

4. You can only see the hierarchy visualization by individual record, you cannot see all records in one hierarchy diagram, you need to choose one record to see the hierarchy, it is one by one.

5. You can only see the record detail in 4 fields you have defined in the selected Quick View Form
image.

Primary Contact, Owner, Open Revenue, Open Deals

6. You can have many 1:N Relationship and set the hierarchy to Yes, but you can only have 1 Relationship that enable for Hierarchy Visualization.

image

SNAGHTML5176cd1_thumb[1]

7. You can only have 1 Hierarchy Relationship for Account.

image

8. Following the limitation number#2, in the Contact entity, you can see the Company Name field as 1 of the relationship lookup field between customer record, it can be Contact to Contact or Contact or Account, but CRM will only show the hierarchy for those records that are Contact to Contact, not Account to Contact.

So, you cannot see the visualization of an Account followed by its Employee or Contact person.

For example:

image

I set Jim Glynn with Company Name = A. Datum Corporation (an Account)
It shows the hierarchy icon, but when I click it, it did not show the company record.
Jim is considered as a single record Smile

image

But,if I change the Company Name to another Contact, it will show the hierarchy visualized.

image


image

Now, how to get started? Let’s move on.

How to Set the Hierarchy Relationship for Custom Entity?

Let’s refer to this link:

How about for System Entities?

It is also using the same concept for the selected system entities.

For those selected System Entities that are supporting this feature, by default when you go to the Entity definition setting, you will see a new navigation under Business Rules, for example in the Contact entity.

image

It is only limited to 4 fields information shown, What if I want to see more info?

Remember the steps defined in the previous section? You can actually create multiple quick form but just have to choose one of them as default form.

Then, you can jump to another Quick View Form to see other fields as detail information:

image

Hope this helps!
Thanks.

CRM 2015: Where Is My ‘Advanced Find’ Shortcut?

CRM 2015 has been launched for trial about the end of November 2014.

Now, I am happy to try and explore its new features.

When I want to see the data, I need Advanced Find, of course, yeah, one of favorite feature to do query for End Users as well.

But, where does it go?

Well, previously in CRM 2011, you can find advanced find here

image

And in CRM 2013,

image

In CRM 2015, it has been changed. I can’t find with same way I did in CRM 2013, I just worry that I have to modify the RibbonXML just for this and it is should be to for all entities.
But, luckily, it is not necessary.

Now, this is your Advanced Find shortcut button:

image

CRM gives more space in the top header navigation between + Create and the User name.
It is a great placement enhancement so the user can find easily without a hitch clicking the ribbon anymore.

Yeah, finally we can find it Smile
Thank you.

CRM 2013/2015 Google Chrome Issues Fixes

Hi, we are all know that Google Chrome now is not fully supporting CRM anymore.

So, if you have these symptoms:

1. Error occurred when click the Lookup icon (magnifier icon)

2. In the Form Editor, you have renamed the display name of the label, label width, have modified the checkbox of event enable, field is read only or visible by default, but you realize when you OK and close the dialog, it doesn’t give you any impact, yes, it is because of browser problem.

3. Cannot add components in the solution

4. Cannot export solution

5. And other minor user experience issues

Well, it might be because of your browser is Google Chrome now.

I found that many people in the forum reported unexpected error behavior suddenly and we analyze that most are caused by current browser, Google Chrome, and Yes, I am one of the person that always use Google Chrome as my default browser, honestly Smile

So, how to fix it?

Resolution:

1. You can refer to this link:

Guido has provided a solution about 1 month ago there.

2. If you are CRM Online User, do you realize that Microsoft has provided a way to fix.

image

Just double click to that link, it will redirect you to:

http://support2.microsoft.com/kb/3000002

So, for those who are CRM OnPremise Users, you can try to refer to that link
It will require you to edit the local group policy, which is not clearly stated in the link, so I provided the screenshot here.

image

Enable it.

image

3. Change your habit, well, don’t use Google Chrome, for safety purpose, use IE 11 or Firefox Smile

Hope this helps!
Thanks.