Request a topic or
contact an Arke consultant
All posts tagged 'crm'

Arke Systems Blog

Useful technical and business information straight from Arke.

About the author

Author Name is someone.
E-mail me Send mail

Recent comments




The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2024

Parsing and Validating Phone Numbers in CRM 2011

First off, I would like to thank Joe Gill for getting me started down the right path.  In fact, I'm going to suggest that everyone click that link so you can use his helpful screenshots to navigate where to put the JS I'm about to post. 

In any case, I had not seen a full example of parsing a phone number in CRM 2011 as I had with CRM 4.0.  Since it is such a common need, I decided to make my own.  The following code will strip out all special characters, check and make sure it's a valid set of numbers, and then push it back to the field, parsed properly.  This is limited to 10-digit phone numbers at the moment, but the core structure should be easily expanded if you need different types of validation.

The nice thing is, this can point at any entity, and any attribute that holds a phone number.  I strongly recommend adding this to your standard JS library for all CRM 2011 projects.

function validatePhone(context)

var phone =context.getEventSource().getValue();
var sTmp = phone.replace(/[^0-9]/g, "");
phoneRegex = /^\d{10}$/;

if( !sTmp.match( phoneRegex ) )
   event.returnValue = false;
   alert("Phone must contain 10 numbers.") ;
   var sTmpClean =  "(" + sTmp.substr(0, 3) + ") " + sTmp.substr(3, 3) + "-" + sTmp.substr(6, 4);

Posted by Wayne Walton on Wednesday, June 22, 2011 4:34 PM
Permalink | Comments (0) | Post RSSRSS comment feed

CRM2011 CrmOnline CrmSvcUtil

This post is based off of the CRM2011 SDK. If you do not have a Windows Live DeviceID and Device Password, you will need to build and run CreateCRM2011Device. After running, it creates an XML file in  C:\Users\your_username\LiveDeviceID called LiveDevice.XML that contains your DeviceID and Device Password. You should first check to see if you have this file if you are unsure of whether or not you have a DeviceID and Password. Also, you will need to install WIF.

After you have created your DeviceID and Password, I recommend creating "CrmSvcUtil.exe.config" containing:

    <add key="deviceid" value="your_Device_ID" />
    <add key="devicepassword" value="your_Device_Password" />
  <trace autoflush="false" indentsize="4">
    <add name="configConsoleListener"
       <filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" />

This config file will hold your DeviceID and Password and enable tracing for easier troubleshooting, should any errors occur.

If you try to run CrmSvcUtil the way the SDK shows, it will not work. There are switches that the SDK says to use that are not valid, they should be removed: /disco /partner /env /org.  The only switches that willbe needed to accomplish the task at hand are /url /out /username and /password.  With that in mind, your command should look like:

CrmSvcUtil.exe /out:Code.cs /url:https://Your_CRMOnline_URL/XRMServices/2011/Organization.svc "/username:Windows_Live_Username" "/password:Windows_Live_Password"

NOTE: The url MUST look exactly as above. It cannot end with "/" or "/$metadata" and should not be OrganizationData.svc

Posted by Michael Casciano on Thursday, January 6, 2011 11:33 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Dynamics CRM 4.0 Update Rollup 4 released

Why is seems like just yestarday we were posting about Update Rollup 3, and here comes Rollup 4!


You can find the KB article here: 

The actual files are here:  

Don't forget the updated help files!

One quick addendum, make sure you clear your Internet Explorer cache after installing on both the server and the client side.

Posted by Wayne Walton on Monday, May 11, 2009 2:16 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Dynamics CRM 4.0 Update Rollup 3 released

While at Convergence last week, Microsoft went ahead and released Update Rollup 3 for CRM 4.0.  You can get it here.

A few important notes:

  • Importing and exporting customizations is supported between servers with Update Rollup 2 and 3, but not supported between Release, Rollup 1 and Rollup 3. 
  • The CRM for Outlook Client has some memory usage issues resolved.
  • Performance issues with CRM related to the email router have been resolved.

Categories: CRM
Posted by Wayne Walton on Tuesday, March 17, 2009 10:26 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Useful CRM links

For those of you who are looking for resources to help with CRM issues, or just to keep up on the news of CRM, I wanted to provide a few links.

So I hope that helps anyone looking for solutions and/or community for CRM.  If you are in LinkedIn, there are numerous CRM groups there as well.

Finally, Update Rollup 2 for CRM 4.0 has been released!  Get those patches up and running.

Categories: CRM
Posted by Wayne Walton on Thursday, January 22, 2009 11:30 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Hiding and Changing Left Navigation Items in CRM 4.0 Entity Screens

First off, I want to give a big thank you to Jeremy Winchell for writing up the post that got me started in the right direction for this solution.

For those of you that customize Microsoft Dynamics CRM 4.0, like I do, then likely one of the things you repeatedly run into is clients and users that need to have better names for their actions.  Changing these names on the main navigation page relatively simple, but what about on all the other pages, like Contacts, Accounts, etc.?  These, for whatever reason Microsoft had, aren't removable or changeable.  It's a really painful oversight to have to tell a client that even though you have renamed "Products" to "Hardware", they're going to have to remember that it's still going to be "Products" in a few places.  Hopefully the next version of CRM will have the capability to alter and remove these natively, but until then, we'll have to roll our own.

 Warning, the following actions are not supported or even documented by Microsoft.  Use at your own risk.

Now that the disclaimer is out of the way, let's take a look at the meat of the solution.  First, go to the customization area of the Entity you want to change, and open its form view.  In there, click Form Properties and enable JavaScript for the OnLoad action.  The link above has pictures if you're not sure how to get there.

Now you will need the JavaScript:
document.getElementById("%variableName%").style.display = "none"

So in this line, %variableName% is the variable related to the button on the left-hand nav.  “none” will hide this element entirely.  (Also, make sure if you copy and paste that you don’t end up with retarded Word-style quotes.  That happened to me and I spent 10 minutes trying to find a typo in my code)

If you want to change the display name of a button, then you have a bit more work to do.

Again, the JavaScript:
document.getElementById("%variableName%").innerHTML= "<img src=\"%imageLocation%\" /> %displayName%";

Here, you will see that we’re using innerHTML to actually change the content of that button.  Now you don’t have to have the image code in here, but if you leave it out, then your link won’t have an image anymore, and will just be text.  If you want to keep the image, the best thing I have found is to use the IE Dev Toolbar and then look at that button’s properties (to get the IE Dev toolbar on a popup screen, hit Ctrl+N).  You will see the link to the default image there.  This is going to be different for every CRM install, so I have not included it on the table below. Then just change the Display Name with whatever you want the button to actually say, and you’re set!  Note that the quotes around the image location have to be escaped.

Below is a list of the links, their variable names, and their default Title.  From there, making changes to the left nav of any entity in CRM should be simple.   You will see repeats of some.  The reason for that is because MS was not 100% internally consistent in its naming scheme.  For example, Cases is IDed by both navService and navCases, depending on where you are.  For those, I would either try both, or check on the screen itself.


Link ID Name

Default Title



View Activities

Campaign Activities


View Campaign Activities

Campaign Responses


View Campaign Responses



View Campaigns



View Campaigns



View Cases



View Cases



View Competitors



View Competitors



View Contacts

Contacts Excluded


View Contacts Excluded

Contacts Selected


View Contacts Selected

Contract Lines


View Contract Lines



View Contracts



View Documents

E-mail Messages Created


View E-mail Messages Created

Existing Products


View Existing Products



View History



View general information about this record



View Invoices

Marketing List Members


View Marketing List Members

Marketing Lists


View Marketing Lists

More Addresses


More Addresses



View Opportunities



View Orders

Other Contacts


View Other Contacts

Planning Tasks


View Planning Tasks

Price List Items


View Price List Items



View Products

Quick Campaigns


View QuickCampaigns



View Quotes

Related Campaigns


View Related Campaigns



View Relationships

Sales Literature


View Sales Literature

Sales Literature


View Sales Literature



View Sub-Accounts



View Sub-Contacts



View Substitutes

Target Marketing Lists


View Target Marketing Lists

Target Products


View Target Products



View Workflows

Write-In Products


View Write-In Products


So now you should have all the tools you need to customize the Entity Screens into something useful for your clients and users.  And don't forget, if you break something, you can always just delete the JavaScript and start over.

Posted by Wayne Walton on Tuesday, October 14, 2008 2:30 PM
Permalink | Comments (0) | Post RSSRSS comment feed

The Importance of Your Customer Data Lifecycle

This is a first of a series of articles I will be writing on customer data in business.  I'm starting off with a broad scope, but plan on breaking down into how CRM can help in these situations in future articles.


When you think of companies, what do you think of as their most important asset?  Is it what they produce?  If it the real estate they own?  Perhaps their employees, as so many are wont to claim.  While all of these might be important, none of it matters without customers.  A company’s information on their customers is their lifeline to continued success and profitability.  Without it, they have no reliable way to upsell their returning customers.  They have no way to follow up and make sure their customers’ needs are fulfilled.  Further, loss of customer information can lead to lawsuits and public embarrassment.  All told, the data you have on a customer has a lifecycle.

This lifecycle begins when you acquire a new customer.  Who is responsible for entering a customer’s data?  Does everyone follow established procedure when they enter new information? What is the initial follow-up procedure?  Consistency ensures that all future maintenance and manipulation can be done with a minimum of fuss. This is also a good time to ask questions of your new customers.  Most will appreciate the attention.  As a personal example, I enjoyed a particularly good beer recently, and wrote the maker, Anheuser-Busch asking them to produce more.  A couple weeks later, I got a call from them, wanting to know more.  They spent an hour on the phone with me, picking my brain about what I like.  In the end, they knew a lot about my beer habits, and I felt useful.

The main lifecycle of most customer data is while they are active customers.  This is the part that is most obviously critical to a business.  How are customers being upsold? What market trends can be gleaned from current sales? When they leave, why are customers leaving?  These three questions are closely tied together, and really lead to one determinant question.  Are you fulfilling your customers’ needs? Without the answer to this key problem, a company can never truly thrive.  As an example, Google’s whole business model is built around getting buyers and sellers together as effectively as possible.  Most people think of Google as a search company, but in reality their business is advertising.  Their AdWords (and its counterpart, AdSense) product is designed to create an efficient market where companies can bid on commonly used search terms.  Between this, and the ROI (return on investment) tools they offer to their customers, Google has built one of the most effective systems in the world of connecting company and customer.

Finally, in its end time, customer data must be secured and stored. Is there a data retention policy in place? What security measures are being taken to ensure that sensitive data is not inadvertently released? What is being done to mine this old customer information?  Old data is both a treasure trove and a security hazard. Properly analyzed, old data might reveal former customers that have a need of a new offering you have, or a fixable flaw in why you they are former customers.  Flipside, an embarrassing data leak can lead to a company being in the papers for all the wrong reasons.  Likely the most famous example is when CardSystems released 40 million credit card numbers accidentally.  Charges were even brought against them by the FTC.  This kind of loss could even sink a company.

The lifecycle of customer data is easily the most overlooked process in companies today.  As it is not a physical, tangible object, many tend to undervalue such information, even though it represents the core of what a company does. After all, without anyone to sell to, what would a business do?

Posted by Wayne Walton on Monday, March 17, 2008 2:16 PM
Permalink | Comments (0) | Post RSSRSS comment feed