{Step by Step}Convert CRM Online Trial to Paid subscription using Promo code

First thing most clients do is go for a CRM trial. Then when you buy the subscription here are the ways to apply

if you are using the Promo code option. As the official documentation doesn’t exist for this, I am sharing the steps:

Step 1: Go to office.com/setup365 and sign in using your trial 365 Global office 365 admin user account:

clip_image002

Step 2: Enter the Promo code (25 characters long) after signing in:

clip_image003

Step 3: Enter the service usage address:

clip_image005

Step 4: Confirm the subscription:

clip_image007

Step 5: Check the licenses to be assigned:

clip_image009

Hope it helps and Happy CRMing!

Advertisement

{HAPPY MILESTONE – 251st Blog} 250 Reasons for Dynamics CRM Community to Smile!

I need to thank all my readers and community again today! This time Dynamics of Dynamics CRM is celebrating its 251st post!

I request you to leave me some comments this time around as nowadays I am getting lesser of them.

It serves as a great motivation to keep writing, so don’t forget to do it today if

this blog ever helped you or you learned something!

clip_image001

It’s a tree that just keeps growing and learning!

Happy CRMing!

{ADVANCED FIND TIPS}Using Advanced find – Part 1 on Security roles, users, teams and views

One of the coolest features in Dynamics CRM is definitely advanced find. I have not seen any other product with such great search

capabilities in CRM space for end users, IT pros, Business users alike.

clip_image002

Anyways, let’s come to the core idea. This is part 1 of the mini series and I will start with really simple examples.

Here is an example to find all users who are System Administrator:

clip_image004

This will pull all users who are System administrator in the system:

clip_image006

Next one, finding users who are part of some team:

clip_image008

clip_image010

Way too simple, isn’t it?

Let’s get list of all Views in the system. Want to navigate to customizations area? Wait:

clip_image012

Here, Admin can go and quickly update the ones he or she wants:

clip_image014

Clicking will open View editor, no need to navigate anywhere. Just click Advanced find!

Hope it helps and Happy CRMing!

{Quick Tip} When you need option set text value inside your plugin in Dynamics CRM

Normally when a developer in CRM goes to check Option set value only finds out that the Option Set is stored

as an integer and to get the string value normally people use methods like this one:

Look at the approach at this link:

http://stackoverflow.com/questions/24873581/get-the-string-value-from-optionsetvalue-in-crm-plugin

Doing a metadata call for this.

Metadata calls are more time consuming than value already available in memory.

clip_image001

Well CRM does provide a direct way if you have the entity already retrieved, which most oldies in CRM know:

string optionSetText = entity.FormattedValues[“optionsetname”];

Hope it helps and Happy CRMing!

{C# 6.0 and VS 2015 Quick Tip} Coding Superpowers for CRM developers – Part 3 Code Lens for VS 2015

Part 1 of the post is here: Click here

Part 2 of the series is here: Click here

This is part 3 of the series on new features available with C# 6.0 and Visual Studio 2015. In this post I am going to go through

CodeLens feature on Visual studio 2015.

One of the new cool features with Visual Studio 2015 is Code Maps.

This is not available for Visual studio 2015 community edition.

Here is how to do this:

Just go to the project and Select Show on Code Map:

clip_image002

Below I am giving a run down on the Sample Plugin solution being provided with SDK:

clip_image004

So, what’s the big deal here? Just click expand

clip_image005

And keep expanding to have a great visualization of your code:

clip_image006

Hope it helps and Happy CRMing!

{C# 6.0 and VS 2015 Quick Tip} Coding Superpowers for CRM developers – Part 2

Sometimes there is a long gap between Part 1 and Part 2 of my blog series.

But its just because I want to use the concepts in my projects or POC’s before sharing them.

image

The Part 1 of this series is here: Click here

Part 2 Goes here, the new features which can benefit you!

The new null conditional operator {?.}:

You can do multiple layer null check in one condition, the below snippet checks EntityCollection is not null

and then checks Entities is not null:

  EntityCollection entityCollection = service.RetrieveMultiple(query);

 

                            if (entityCollection?.Entities != null)

                            {

                                // Processing logic

                            }

 

What’s more you can also do null check and also match conditions , the below snippet checks EntityCollection is not null,

then checks Entities is not null and also matches entity count condition:

EntityCollection entityCollection = service.RetrieveMultiple(query);

 

                            if (entityCollection?.Entities?.Count > 0)

                            {

                                // Processing logic

                            }

 

Nameof Operator:

This operator helps you to get the name of a particular type and can be used for handling in exceptions and tracing:

For example:

var entity = service.Retrieve(“account “, new Guid(“B18DFC86-4776-E511-80FC-3863BB343C90”), new ColumnSet(true));

 

                    Console.WriteLine(“Var in entity is of type: “ + nameof(entity));

                    Console.WriteLine(“Attribute collection in entity is of type: “ + nameof(entity.Attributes));

Gives the output:

clip_image001

Exception filters:

In your CRM exception handling you can filter by messages now:

  try

                    {

                        throw new Exception(“CRM Exception”);

                    }

                    catch (InvalidPluginExecutionException ex) when (ex.Message == “CRM Exception”)

                    {

                        //control will not come in this catch block

                    }

                    catch (Exception ex) when (ex.Message == “CRM Exception”)

                    {

                        //control will  come in this catch block

                    }

Hope it helps and Happy CRMing!

{Error resolution} Import Solution Error: 0x80044150 in Dynamics CRM 2015

Recently in a project we were getting the following error:

clip_image002

Log file will show following entry:

clip_image004

A little digging told me that this happened as we changed attribute types keeping the same attribute names.

clip_image006

So, next thing was to compare the types, delete the old fields from target environment.

Import the solution back and this time it was successful.

Hope it helps and Happy CRMing!

{New utility}Activity Timeline for Dynamics CRM 2015

Activity timeline is a chart that depicts how a set of activities were planned over time.

If you’re managing a Sales pipeline and want to illustrate who is doing what and when, or if you’re organizing a

conference and need to show progress, a timeline is often a reasonable visualization choice.

Download link: Click here

1. Open to the CRM organization and navigate to Settings->Solutions.

2. Now click on import solution and select the managed solution of activity timeline control.

clip_image002

3. Now click on next and install the solution. Review that the solution installs without any error.

clip_image004

4. Now open the entity form on which you want to enable the time line control.

Add a new tab and in the tab, add a web resource pointing to “dya_timelinecontrol”

clip_image006

5. For better visual representation, set the number of rows property to 18.

clip_image008

Save and publish the customizations.

6. Open the form to see the web resource.

clip_image010

7. Hover over the dot symbol to view the activities on that date. As per the color coding there will be various activities. If you click on any of the row, it will redirect to the respective activity.

clip_image012

clip_image014

clip_image016

Hope it helps and Happy CRMing! Please leave feedback in comments.

A special thanks to Simaranjit for this, you can connect us on:

{Quick Tip} 3 TIPS to be a more productive Dynamics CRM Professional

I was asked recently by one of the guys about what are the most important things which are needed by a

CRM professional to be more productive.

This question goes beyond the discussion of technical or functional expert. I took note of penning what I

have seen in the industry that productive people do. There is no dedicated formulae to be more productive

in ever so fast paced Dynamics CRM world. Here are 3 tips that I feel are important:

· Create Reusable Assets:

Ø One thing I have noticed what Productivity bring is by saving time on whatever you can.

Ø If you are technical, create reusable snippets/frameworks/technical documentation templates.

Ø If you are functional, create reusable pre-sales content, demos, etc.

Ø Store them and be able to locate them is also as important as creating them so that they can be

referred quickly when needed.

clip_image002

· Use the right tools

Ø One thing I have noticed what Productivity bring is by using tools.

Ø If you are technical or functional, it doesn’t matter as long as you know that there are lot of tools in the community and

open source out there for Dynamics CRM to consume. A great example is XRMToolbox by a great MVP Tanguy Touzard

Ø Again Storing them and be able to locate them is also as important as using them so that they can be referred quickly when needed.

Do not try to hit a nail with a screw driver!!

clip_image004

· Take breaks at proper intervals

Ø One thing on how Productivity can be increased is by having proper breaks.

Ø If you are technical or functional, it doesn’t matter as long as you are taking proper breaks. Human brain has a tendency

to perform well when it is fresh. Remember the day to office break from a vacation is lot fresher and brighter for new ideas.

A mind which is not fresh is not productive.

Ø Not taking breaks doesn’t prove a great work ethic but many organisations and people have a habit of sitting

till late just to prove a point that they are working hard which I haven’t seen is mostly the case

Ø Smart people manage their time well, take breaks and do not tire there brain and work late.

clip_image006

Get a coffee and come back for that CRM problem again!

Hope it helps and Happy CRMing!

{Advanced scripting tip}Traversing and reading column values in Sub Grids in Dynamics CRM 2015 Update 1

Before 2015 Update 1, it was very difficult to traverse through the sub grid elements in Dynamics CRM form.

Now with introduction of support for Grid events it has become easier.

Having said that, there are not enough code samples or blogs on this topic.

In a recent project, this became a necessity and I went through the code to read individual column values, sum them as well.

In this example I am putting a save of the column values using a function and alerting on form save:

Here is the code base:

function onSaveSumNotification()

{

      //Get all Rows of Child Grid

      var allRows = Xrm.Page.getControl(“Child”).getGrid().getRows();

      var allGridRowData = [];

      allRows.forEach(function (row, i)

      {

            allGridRowData.push(row.getData());

      });

      var sum = 0;

      //Read values of all the child grid fields and add them

      for (var i = 0; i < allGridRowData.length; i++)

      {

            sum += parseInt(allGridRowData[i].getEntity().getAttributes().getByName(“dynamics_integer”).getValue());

      }

      //Show notification

      Xrm.Utility.alertDialog(“Sum of integers is: ” + sum.toString());

}

 

And the result:

clip_image002

Note: Due to the asynchronous loading of the sub grids it might not be best suited for on load handler

as the sub grid might not have loaded till the point when the on load event gets hit.

Hope it helps and Happy CRMing!