CRM Development

26Nov

Fetch XML Editor Error Handling

Recently I added an update concerning the Fetch Tester 3000 containing some improved error handling.  If you are unfamiliar, Fetch Tester 3000 is a terribly named Fetch XML Editor available on CodePlex.  Before we look at the Fetch XML Editor Error Handling, let me provide a quick general update…

Twitter is awesome!

Last Friday was interesting for me. I finally released the editor and oddly enough someone else released one as well.  These solutions were hours apart and @crmanswers brilliantly called it “FetchXML Friday.”

The FetchXML builders are quite different presently but the feature paths look similar.  My plan is to have the Fetch Tester 3000 work with both the XrmToolbox and as a managed solution within CRM.  I can see users having a strong preference for one way or the other and so why not both?  I also want to build a GUI.  In fact, I’ve got a laundry list of features planned.

The benefit of the managed solution is leveraging context within CRM.  I want to save and edit views with this tool.  The SDK allows for complexities the normal interface doesn’t offer.  Additionally, it would be cool to have an advanced find and switch to the Fetch Tester 3000 with it loading what’s already built in the advanced find.  A managed solution can also be used with tablets.

Read More »

14Nov

Fetch XML Editor (Part 2)

The saga continues…

I’m infatuated slightly so I’m not trying to hype this as much as just broadcast my own excitement.  The tool might not be as easy as stunnware was back in the day, but it should make things significantly easier.

Fetch XML Editor (Part 2)

Tonight I was able to get the auto-complete working for the linked-entity relationships (one-to-many).  Justin has got the validation taking place and it’s pretty incredible.  The error messages are clear and helpful.

I also built a mockup of the interface (let us know your feedback).

Love it or hate it?

Love it or hate it?

 

Random Useless Info

Found something the other day that I thought was interesting.  I never noticed this because I usually validate my fetch using Notepad++, but CRM doesn’t validate your fetch against the schema before executing.  This is probably due to performance.

Anyhow, this fetch will execute:

The results are NOT correct; however, the fetch does execute.

Why does this matter?  Look, I already said this was useless…  But it also means the validation feature within ft3 will be optional.

18Jul

Sending Text Message Alerts from CRM 2013

I often find users are looking for ways to alleviate the email overload.  Sometimes important emails are missed due to a hectic day.  In some situations a remedy I like to incorporate is the ability to text message a user for events or status changes the user really cares about.  Leveraging Microsoft CRM and cell phone carriers’ email feature, we can offer users the ability to receive critical alerts via text messaging in addition to normal email.

 

Emailing a Text Message

What’s great about this is that you don’t need to install a special add-on to send text message alerts from CRM.  What you will need is the recipients cell phone number and carrier.  Each carrier has a specific text message domain, here’s a list of the most common carriers (full list here):

Carrier Domain
AT&T @txt.att.net
Sprint @messaging.sprintpcs.com
T-mobile @tmomail.net
Verizon @vtext.com

All of the carriers use the format of phone number followed by the domain.  For example to send a text message to a Verizon user, you’d email them 8645551234@vtext.com.

When you send text message alerts from CRM you’ll have the subject in parenthesis (if populated) and the body will be shown right after.  Here’s an example:

image

Read More »

22May

CRM 2013 FetchXML Improvements

With CRM 2013, Microsoft added some awesome improvements to their FetchXML.  For those unfamiliar, FetchXML provides you an easy way to query information out of CRM.  With the CRM 2013 FetchXML improvements you can perform significantly more queries than ever before.   Today I want to show you my favorite new feature which is alias filters.

CRM 2013 FetchXML Improvements – Looking at an Example

Let’s say you wanted to find the number of active accounts without contacts.  With CRM 2013, this is now possible and super simple, here’s how.

To start, let’s query for all of our accounts:

Simple enough, and in my test scenario I get 15,179 records.

To be fair though, we are only looking at active accounts, so let’s add a filter.

This returns 14,589 active records.

Adding our Linked Entity and Alias Filter

Now comes the fun part, with 2013 we can also add to our filter, columns concerning our linked entity.

This returned 839 records.  That means in my CRM environment, I have 839 accounts that do not have any contacts associated.  In my case, I want to list those accounts and find which ones need to be deactivated and/or who from sales I should contact to make sure we get the proper contact information inside CRM.

At this point, the count tells us the number of companies we need to review, but really we want tangible data.  Let’s modify this query to get something we can have someone analyze.

Here I’ve added the telephone and composite address (which pulls line 1, city, state, and zip).  I’ve also limited this to 10 records in case your environment has way more than 800.  The primarycontactid should not return, but I’ve included so you can verify.

 

Looking at our Fetch filter, you may notice a new attribute called entityname.  For some of you, this is pretty exciting and ideas are churning through your head already.  If you’re like me, you have had to perform multiple queries to accomplish similar feats.  Luckily with CRM 2013 we can get to our desired data quicker and easier then ever before.

 

What are some more scenarios?

With the new alias filter option, you can look for:

  • Leads without tasks
  • Contacts without activities
  • Strategic contacts without activities for the last 6 months
  • Contacts for top tier accounts in one city combined with contacts for top tier & important accounts in another city

The last one may seem random, but the more you explore the alias filter the more you will be glad you did.

I hope you enjoy!

 

 

25Apr

CRM 2013 – Aggregate Query Record Limit Exceeded

If you are using my CRM Data Detective or trying to perform aggregate queries against your CRM database, you may occasionally see an obscure error message.

CRM 2013 - Aggregate Query Record Limit exceeded

CRM 2013 – Aggregate Query Record Limit Exceeded

 

The specific message is:

AggregateQueryRecordLimit exceeded.  Cannot perform this operation.

 

CRM 2011 and CRM 2013 by default are limited to performing aggregate queries on less than 50,000 records.  With online, you cannot change this value; however, with on premise or partner hosted you can.  I’d recommend modifying this value to 250,000.

In my experience, CRM easily handles 250,000 records as long as you’re following the hardware specs Microsoft recommends.

Modifying the On Premise Settings

Warning!  If you are unfamiliar with making these changes, ask someone who is familiar for help.  Whenever you are making advanced setting changes, use caution.

To increase the limit, you’ll need to modify:

Database: MSCRM_CONFIG
Table: Deployment Properties
Column: AggregateQueryRecordLimit

To query the current value:

To modify:

 

Here’s an MSDN reference for using C# and/or PowerShell: http://msdn.microsoft.com/en-us/library/gg328128.aspx

 

If you are interested in other limits CRM has, take a look at this:

http://social.technet.microsoft.com/wiki/contents/articles/12601.crm-2011-timeouts-and-limits.aspx

 

I hope you enjoy!

30Mar

Sending Unresolved Emails

Today we’re looking at sending unresolved emails in CRM.  Have you ever wanted to email someone who is not in CRM?  Sometimes it can be frustrating to have to create a contact or lead record for a person just so you can email marketing material.  Additionally, you may want to avoid cluttering up your CRM system with a “fringe” listing of contacts.  By allowing “unresolved” email addresses to be sent, you can do just that.

In addition to configuring CRM, I’ll demonstrate how to send an email from C# (using the CRM 4.0/2011/2013 SDK).

Configuration required for sending unresolved emails in CRM

To start, let’s look at the system settings we’ll need to change.  Begin by selecting Settings > Administration > System Settings.  This will bring up a prompt, select the “Email” tab and select “Yes” for the “Allow messages with unresolved e-mail recipients to be sent” option.

To send emails to recipients not in CRM, select the "Yes" option.

To send emails to recipients not in CRM, select the “Yes” option.

 

Sending unresolved emails in CRM from C#

Here is an example using late binding:

An early bound example of sending emails, can be found here: http://msdn.microsoft.com/en-us/library/hh210217.aspx

You can also mix and match unresolved addresses or in this next example add the primary address of a specific user:

 

Hopefully these options spark some ideas or resolve a frustration you’re currently facing.

 

12Mar

CRM 2013 Gamification


CRM 2013 Gamification

Today we’re talking about CRM 2013 Gamification.  Before we start, I want you to know that I cringe at the word “gamification”.  Don’t get me wrong, I actually like, believe, and implement gamification; however, gamification has a bad connotation because of how people have hyped and improperly implemented it.  There are fantastic examples of very successful gamification, my favorite being stack overflow.  But for every good example, there are probably dozens of implementations that ended with loyalty backlash and frustrating results.  The good news, is that today I’m going to share with you the secrets of good CRM 2013 Gamification for the low, low price of…

 

An example of what not to include with Gamification in CRM 2013

Imagine staring at this all day…

Congratulations, you’re a Winner!

Sorry, the first thing to know about gamification is: avoid cheesy things!  No one wants blinking or moving graphics.  No one.  Instead of focusing on the negatives though, I want to talk about the things you need in order to get productivity gains coupled with user engagement.

Read More »

14Feb

CRM DevTools Extension by Sonoma Partners

Blake Scarlavai over at Sonoma Partners built a very cool Chrome add-in called CRM DevTools.  This applies to CRM 2011 UR12+ and CRM 2013 and allows you to quickly find the record’s GUID without having to remember Xrm.Page.data.entity.getId() or typing any of this into the console directly.  The tool also allows you to execute fetch and see the results.  This is a great time saver and something everyone should have in their toolbox.

Here’s an excerpt:

CRM DevTools

CRM DevTools is an extension to Google Chrome which can be found here in the Chrome web store.  This extension provides a variety of tools to help optimize customizing and troubleshooting within Dynamics CRM.

Form Information

CRM DevTools - Form Information

  • Displays the current form’s back-end information
    • Entity Name
    • Entity Id
    • Entity Type Code
    • Form Type
    • Is Dirty
  • Ability to show the current form’s attribute’s schema names
  • Ability to refresh the current form

Current User Information

CRM DevTools - User Information

  • Domain Name
  • User Id
  • Business Unit Id

There is a lot more to what this add-in can provide.  Here’s the original post.  I think this is a great idea and I’m excited to see if more and more functionality is added to this down the road.

18Jan

CRM 2011 – Creating a 3rd-Party Dashboard Widget

The “snapshot view” of Dashboards within CRM 2011 is a phenomenal feature that many organizations neglect.  If in your environment people seem to disregard your dashboard needs, then this should hopefully help add some spice.

Today, we’re going to create a widget for a customizable list of stocks.

image

Although stocks may not apply to your needs specifically, I hope the concept of bringing in data from outside CRM into a dashboard widget will be something you’ll see the need for.

 

Preparing our Entity

To start, we’re going to use the account entity.  Luckily for us, the account entity already contains an attribute for us to use called “Ticker Symbol”.  (Microsoft knew I’d want something cool to blog about in 2013).  So, our first step is to add this stock symbol attribute to our form so we can update any of our publicly traded accounts.

image

 

If you notice, the “Ticker Symbol” field includes a hyperlink.  When the user double clicks the link it will take them directly into the MSN money page for the symbol, which is a pretty cool feature.

Taking this further…

I also went ahead and included an ownership attribute.  This would allow you to use some JavaScript to show or hide the ticker symbol field.  Additionally you can create a view called “Public Companies without a Stock Symbol” to help find newly created companies without stock symbols more easily.  Or you could require the ticker symbol for public companies.  That’s what I love about CRM – wicked flexibility.

Once we have added the field to the form, let’s update a few companies with their appropriate stock symbols.

 

Getting the Stock Symbols out of CRM

Now that our form configuration is done, let’s do a little development work.  I began by building a new Solution called “Stock Widget”.

image

Inside of my solution, I’m using jQuery and JCL.  I also created a listing.html web resource to get started working with.

So far, here is what I have (the final code is available for direct download at the end of the post):

image

 

This is pulling our related companies and creating a URL to query the JSONP service.  The window.open command (line 38) should prompt you to download a text file.  You can then copy and paste the text file into a JSON formatter (e.g.http://jsonformatter.curiousconcept.com/).

A quick aside…

To query the data, we’re using Fetch.  Since I based this query off of the “My Active Companies” view, I went to the advanced find from the view and clicked “Download Fetch”.  This allowed me to mostly copy and paste this fetch into my JavaScript.  I had to add the tickersymbol filter line, but most of my work was already done for me.

Notice also in this file, I’ve established paths within my web resources.  This is good practice for keeping your web resources organized within your environment.

 

Getting the Stock Data

Now, we need to handle the stock results we’re getting back.  From our previous step, we were able to get a nicely formatted JSON set of data.  This step is about calling the JSONP stock service and actually do something with the results.

image

There are three changes in this step we need to make:

  • Add the callback parameter (Line 24).
  • Add our “processStockInfo” function (Lines 43-52).
  • Replace the window.open line with an AJAX call to the JSONP stock service (Line 39).

These changes collectively convert the JSON results into a table with specific stock information.

 

Cleaning up the Widget

Once we have this updated inside our solution, let’s add our widget into a dashboard. Here’s what we get:

image

At this point the widget looks ugly.  Let’s apply some CSS to make this look like it’s a native CRM add-on.

image

Putting it all together, we end up with the following control on our dashboard:

image

 

Going Forward

This post focused on creating a 3rd party widget; however, you could create your own JSONP service to display any kind of data just as easily.

All of the code can be downloaded here:  https://github.com/paul-way/JCL/tree/master/Examples/Stock%20Listing

If you made it this far, I’m sure you’re well versed with knowing CRM stands for Customer Relationship Management.  I’m sure you’re also familiar with the term XRM.  However, instead of thinking about “eXtensible Relationship Management”, I want you to start thinking “eXtensible Relationship Mash-up”.  If that’s too cheesy for you, I at least hope this little demo is a reminder that data doesn’t have to live in CRM for data to be used inside of CRM.

As always follow me on twitter (@paul_way) and let me know if you like it or hate it.  Also, throw some comments out there.

I hope you enjoy!

© Copyright 2012-2014, All Rights Reserved