Tip #429: Calculating with empty fields

Calculated fields are all the rage, it seems. Today’s tip is from the Lego land, and it does look that CRM people over there do have very long daylight hours to come up with awesome tips. Plus their names look cool. See for yourself, passing the baton to Stig “Not that  Stig” Højmark Jensen.

Hi Tippers

Since I have found many helpful tips from following you on Twitter, I thought it was time to share this little thing that I found out yesterday when trying to meet a requirement using calculated fields.

In this case, the users have three currency fields on the opportunity for recording expected revenue in three different areas.

  • Est. Revenue Furniture
  • Est. Revenue Copy/Print
  • Est. Revenue Supplies

None of the fields is required.

We need the calculated field called Total Est. Revenue, which is pretty easy to make. But if you just add the three fields together, it will only show a result if all three fields have a value. If just one of them is blank, the result will show up as empty (‐‐).

Solution is to create three calculated fields:

Est. Revenue Furniture value
    If Est. Revenue Furniture contains data, result is Est. Revenue Furniture otherwise result is 0
Set Estimated Revenue Non-Blank

Est. Revenue Copy/Print Value and Est. Revenue Supplies value are done in the same way.

Now I can create my Total Est. Revenue by simply adding Est. Revenue Furniture value + Est. Revenue Copy/Print Value + Est. Revenue Supplies value

Result for non-blank calculations

Thanks for a great website and lots of great tips. (Thank you! – t.j.)
Med venlig hilsen / Best regards

Tip #428: Tipsters guide to folder-level tracking: end-user

It’s Friday and it’s video. Derik is here with the second part of the folder-level tracking saga and this time the focus is on end-users. If you are an administrator, make sure you watch the first part.

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

YouTube player

 

Tip #427: Making sense out of plugin parameters like a boss

As some of you may know, correcting Joel is one of my hobbies. But being able to add to a Tanguy’s tip takes it to a completely new level. To recall: our challenge is to find all parameters including their types specific to a plugin message.

Instead of writing some temporary code only to delete it later, how about finding microsoft.xrm.sdk assembly in your project references and use Visual Studio Object Browser:
Browse object library

Like a boss memeNote: inherited properties like RequestId, RequestName, etc, are common for all messages and can be found at the OrganizationRequest object level.

Tip #426: Making intelli-sense out of plugin parameters

Our today’s tipster is the man himself: Tanguy “The XRM Toolbox” Touzard.

Did you ever feel lost when you wanted to develop a plugin and didn’t know what keys to use in IPluginExecutionContext.InputParameters or IPluginExecutionContext.OutputParameters? Did you ever wonder why we do use the mysterious “Target” key when writing a plugin for Create, Update or Delete messages? No more!

When writing your plugin class for a specific message, just find the corresponding Request/Response pair and browse the properties of the Request part for InputParameters and Response part for OutputParameters. You can use these object in your code to enumerate all the keys and then remove this snippets right after you found the keys and their types.

For example, if I’m a new developer and want to create a plugin on Create message but don’t know what keys to use, here is the sample code I can write to find these values (note that only properties that are bold on intellisense menu are available for use)
Intellisense for plugin parameters

As you can see, you can even check the type of the parameter to cast it correctly, so your code might end up looking like the following:
Sample plugin code
 

Tip #425: Track your parcels in CRM

It’s great to see how new features like business rules and calculated fields are changing the status quo in CRM development world. Today’s guest post is from Matt Pope is a testimony to that.

(Got a tip of your own? Send it to jar@crmtipoftheday.com)

Delivery Tracking and delivery notifications

I currently have a customer that wishes to manage deliver tracking and notifications within CRM. They have the tracking number and the delivery company but have to manually open the tracking site and type the number in. Removing the need for the user/customer to search for the tracking website and paste the tracking info in is not a huge benefit but with business rules and calculated fields it is so easy to create the functionality why not!

We need five fields on either a new entity or a current one:

  • Delivery Company – Option set all delivery companies used
  • Tracking Number – For the tracking number
  • Tracking URL – Calculates creates tracking URL
  • Tracking URL Start – Start of the tracking URL
  • Tracking URL End – End of the tracking URL

Business Rule

We also need also need a Business Rule. The objective for this business rule is to set the Tracking URL Start and Tracking URL End depending on the option chosen for Delivery Company something like the one below. The URL can be found with a quick google. This Business Rule does need some expansion, for example should a user switch the delivery company from Parcel Force to UPS the end of the Parcel Force URL will still be calculated into the URL.
Business Rule for parcel tracking

Calculated Field

The following calculated field will create your URL.
Calculated field for parcel tracking

Finished solution

The finished solution will look like the one below, the Unused Fields should be hidden from the form. This calculated URL is now available for CRM users and can be sent to customers automatically using an email workflow. There are a lot of areas this solution could be expanded for example a parental relationship for multiple tracking numbers.
FInished work for parcel tracking

If I had a real tracking number it would work!
Parcel tracking in action
 

Tip #424: Convert activities to campaign responses

Today’s tip is from the “Stuff I used to know but forgot about” file.

So you are making a phone call to a customer to follow up on an email that he received as part of a campaign. You want to see if he is going to register for your event.

Wouldn’t it be great to track the client’s response, so you can report on the success of your campaign? But when you click the “convert to” button, you only have the option to convert to a case or an opportunity. Wouldn’t it be nice to be able to convert an activity to a campaign activity?

You can convert a phone call to a campaign response if the activity regarding is set to a campaign activity. Then you will see a new option in the convert to menu “Promote to response.” This is one of the benefits of scheduling your follow up calls via a campaign activity. Calls can be easily converted to campaign responses.

 

 

Tip #423: Tipsters guide to folder-level tracking: administration

Welcome to video Fridays. You’ve heard it. We now even have our own video dude as part of the team: Derik “Foobar” Bormann . We aim to give you something useful in time it takes to consume a cup of coffee or other beverage of your choice. In the break, between your spurs of awesomeness creating another CRM gem.

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

YouTube player

 

Tip #422: Search faster by searching less

I’d like to be able to search contacts by first name and last name. And middle name. And birthday. And employee id. While you’re at it, add spouse name, comments, city, country, phone number (all of them) and freight terms.

So, what a smart CRM consultant to do? Open Quick Find Active Contacts view and use Add Find Columns button to add a smorgasbord of the columns:

Ultimate search

That’s Spießrutenlaufen right there.

What a smarter CRM consultant to do? Explain to the customer that adding a single column introduces a performance penalty that will be amplified as the database grow.

For example, in one of the recent cases we had a CRM database with approximately 500K contacts, simple search was taking close to 30 seconds. After discussing the issue with the business, we reduced number of fields from 15 to 4 (first and last names, email, internal id). Even a wildcard search takes less 2 seconds now.

Whether you’re building a salad or a CRM system, restraint yourself, people, when it comes to the ingredient count.

Tip #421: No email without activity

Ability to enable entities for emails is great – it’s another useful slice of functionality previously reserved only for contacts and accounts. If you are like me and prefer a minimalistic approach to entity design, you may be tempted to check the box enabling emails and be done with it. This is not going to work well, unfortunately, without enabling activities as well:

Email without activity

It’s one of those things that make total sense when you think about them: emails that you are about to send are activities, right?

Thanks to my good comrade Oleksandr “Salo” Klymenko for the tip!

Tip #420: If your child workflow needs more than one entity

CRM workflows always require an entity to run. But what if you’d like to create a child workflow but need more than one entity or additional parameters? For example, while identifying the business opportunities for a professional photographer, you may want to invoke a workflow called Book the ceremony that involves two people. Let’s assume that someone else on your team will be creating the workflow taking care of the details such as whether it’s a civil or religious ceremony, genders of parties involved, dates, etc.

Option 1

Call custom actionIf your deployment is on CRM Online 2015 Update 1, child process can be created as a global, i.e. not requiring a specific entity instance, custom action.

Note:Do not declare your parameters as Entity – that will make the action not available in workflow UI.

Option 2

Call child workflowIf you don’t have access to all the wonderful new features in CRM Online then you can use what I call a “piggy-in-the-middle” approach: design a helper entity that would hold all the information required, create an instance, fill all the fields and pass that instance into a child workflow.

Note:Since there is no delete operation in CRM workflows, and if workflow volume calls for it, you’d probably want to execute a cleanup bulk delete job removing piggy instances for the completed workflows.

I think I owe myself a treat
Gaytime Multipack