Ramblings about MS Dynamics CRM 2011 and coding basics.

Friday, March 21, 2008

Data Integrity: Mass editing text to picklist

Recently, we migrated data from a source to CRM 4.0. The client's previous field was a textfield but they wanted to control the data in a picklist in their new CRM system. In order to keep all of the information, we migrated the data from a textfield into a textfield. (If you try to map values from a textfield into a picklist, you can run into many errors if the data isn't scrubbed well).

In order to update the picklist in an efficient manner, I instructed the client to create an Advanced Find that displayed the picklist and textfield, filtered where the picklist was null and ordered by the textfield. This way you can look at what should be similar (in not the same) values in the textfield, can highlight the records and then mass edit the picklist to equal the correct value. When you have done several records, you can refresh the search result and it will only return the records that still need to be updated.

I have seen people do similar updates in more taxing ways and wanted to post my thoughts on what should be an easy (although slightly manual) way of keeping the integrity of your data.

Thanks,
Mark

Labels:

Wednesday, February 13, 2008

CRM 4.0 Activity Synchronization

The Microsoft Dynamics CRM 4.0 Installing Guide for the new features in CRM of Outlook reads: "Activity tracking and synchronization improvements are included. Microsoft Office Outlook tasks can now be mapped to Microsoft Dynamics CRM letters, faxes, tasks, and phone calls."

I always thought it was strange that CRM 3.0 Activities of TASK and APPOINTMENT were the only items that mapped into Outlook. In my experience, the synchronization of CRM Tasks to Outlook has never been that useful, since Outlook only will remind you about your tasklist once a day. If you would like to be reminded of something to do during the day, then you should set up the CRM Appointment, since it will synchronize with your Outlook calendar and therefore remind you at the appropriate time.

Even though the other activities can now be mapped to your Outlook Tasks, I think using Appointments is still the way to go for functionality purposes.

Labels: , , , , , ,

What's new in CRM 4.0

I know this has been done on a lot of blogs, but here is my recap on the new features of version 4.0:
  • Multi-tenancy (Host multiple organizations in a single deployment)
  • Differentiated Server Roles (Application vs Platform Server)
  • 4.0 Connector for SQL Reporting Services (eliminated Kerberos douple-hop authentication)
  • 4.0 Language Pack (user language can differ from base language)
  • Multicurrency (supports multiple currencies)
  • Improved Data Management (migrate to all entities, save mappings, de-dupe)
  • Improved Customization features
  • Workflow (located in GUI)
  • 4.0 E-mail Router (not limited to Exchange Server; POP3)
  • MS Dynamics CRM for Outlook (Diagnostics Wizard; Performance improvements)

Visit the Microsoft website for all of the features.

Labels: , , , , ,

Basic Information on Dynamics CRM 4.0

Dynamics CRM 4.0 Editions:

  • Workgroup (Limited to 5 or fewer users; single organization; single computer running MS Dynamics CRM Server)
  • Professional – No user limit; limited to a single organization; can be installed on more than one computer in the same deployment
  • Enterprise – no user limit; support from multiple organizations, multiple server instances, role-based service installations (lets you increase performance by installing component services on different computers)

Licensing – all deployments operate by using a single license key (contains Dynamics CRM version, server license and the CALS)

CAL Types (Client Access License Types)

  • Read Only – view records and data, cannot modify records or data (uses 1 CAL)
  • Administrative – can modify records in data that is located in the settings area only (uses 0 CAL)
  • Full – full functionality and are only limited by specified security roles and privileges (uses 1 CAL)

Labels: , , , , ,

Wednesday, January 23, 2008

Auto-fill Opportunity's topic attribute

This might seem really simple, but sometimes it is really useful.

A lot of people don't know what to write in the TOPIC field of an opportunity record. If you don't write something, then the record appears to be unnamed to the user.

You can auto-fill the topic several ways:
1. You can have all Opportunities have a default name:
//OnLoad Code
if (crmForm.all.name.DataValue==null)
{
crmForm.all.name.DataValue="Opportunity";
}

2. You can set the CustomerID name into the TOPIC field:
//This will name the Opportunity after the client.
//OnChange for the CustomerID attribute
crmForm.all.name.DataValue = crmForm.all.customerid.DataValue[0].name;

Labels: , , , , , , , , , , , ,

Using User's Business Unit

This is something that I have done before, and it utilized Michael Höhne's code again. I made a modification to the User/Datetime Stamp that I previously posted.

In this code, I use the XML call to get the current user's business unit, and use this information to set a picklist. This "defaults" the picklist for the user, based on what his/her business unit normally picks.

Practical uses: This was requested by a client, to ensure that Opportunities were typed according to their business unit, so that the pipeline would be trackable by what business unit the user was in at the time.


(Sorry for the screenshot: Again, I don't know the best way to post XML without it rendering directly in the webpage.)

Labels: , , , , , , , , ,

Wednesday, January 02, 2008

FAQ on using the Bulk Import Tool

Here is a good link off of the MSFT CRM site about some FAQ on using the Bulk Import Tool in CRM.
http://www.microsoft.com/dynamics/crm/using/troubleshooting/tsbulkimport.mspx

This is also a good paper to view:
http://www.consultcrm.co.uk/documents/knowledge/Troubleshooting%20bulk%20import.pdf

Labels: , , , , , , , , ,

Tuesday, December 18, 2007

Datetime User Stamp

I modified some of Michael Höhne's genius to compile an excellent datetime/user stamp.

Example Scenario: Checkbox on the Opportunity form called "Reviewed" When a user checks the bit that it is reviewed, you can kick off this action to automatically capture the current user's name and the datetime in other fields.

I normally make the new_text and new_date fields disabled and then use OnSave code to ForceSubmit those fields. This ensures that those fields can't be tampered with.

You can do other modifications to this, such as: disabled the checkbox once it is checked. This ensures that it can't be rechecked and have the datetime/user information changed in the future. If you do this, then you should place some JS in the OnLoad to check for that bit's value. If it is true, then disable it, so that it won't be accessible again.

Note: when doing this, it ties your hands if someone accidently checks the box and then saves the form. Remember, just be logical. :)

Please comment and be sure to check out Michael's site.

I couldn't figure out how to get the code formatted cleanly on the webpage without the tags rendering. If you have a better solution than "xmp" (it just isn't friendly). Please let me know and I will repost it.

Thanks.




Labels: , , , , , , , , , , , ,

Monday, December 17, 2007

Non-Sequential Dynamic Picklist

I know I haven't posted to my blog in a long time because I have been busy with work.

Here is something that I finished up today.

I needed to create a set of dynamic picklists that could be non-sequential. The SDK gives a solution for a sequential based picklist, but that doesn't take in account for additional values in the future. I found this post by Greg Owens' post here and have edited and rearchitected parts of it. Since he helped me out, I have decided to post it to help you out!

Feel free to post comments. Thank you again Greg!

//****************************************************************
//**Non-Sequential Dynamic Picklist
//**------------------------
//**Developers: Greg Owens (Initial structure)
//** Mark Nagao (Rearchitecture)
//**Date: December 17, 2007
//**Purpose: Dynamic SubPicklist of non-sequential values
//**MSCRM 3.0: OnChange Event Code
//****************************************************************
//****************************************************************
//**Assign your main and sub picklist
var oPicklist= crmForm.all.new_mainpicklist;
var oSubPicklist = crmForm.all.new_subpicklist;

//**End of Assignment editing
//****************************************************************

//Saving and Resetting Original Picklist Values
if(!oSubPicklist.originalPicklistValues)
{
oSubPicklist.originalPicklistValues = oSubPicklist.Options;
}
else
{
oSubPicklist.Options = oSubPicklist.originalPicklistValues;
}

//****************************************************************
//**Add Arrays and specify values to display in SubPicklist

var oArray1 = new Array(0,1,3,4);
var oArray2 = new Array(0,2,5,6);


//**End of ARRAY Editing
//****************************************************************

//Check that Main Picklist value is not Null
if(oPicklist.DataValue != null)
{
switch(oPicklist.SelectedText)
{

//****************************************************************
//**Edit Case: Add a case for each Array

case "Array1":
filterPicklist(oArray1);
break;

case "Array2":
filterPicklist(oArray2);
break;


//**End of CASE editing
//****************************************************************

}
}

//Function to Filter SubPicklist
function filterPicklist(oDesiredOptions)
{

//Create temporary array to hold selected Values
var oTempArray = new Array();
//FOR loop to cycle through all SubPicklist Values
for (var i=oSubPicklist.length;i >= 0;i--)
{
//FOR loop to cycle through desired SubPicklist Values
for (var j=oDesiredOptions.length;j >= 0;j--)
{
//Compare i(SubPicklist Value) and j(Desired Value)
if (i == oDesiredOptions[j])
{
oTempArray[i] = true;
oDesiredOptions.splice(j,1);
}
}
}
//FOR loop to cycle through all SubPicklist Values
for (var i=oSubPicklist.length;i >= 0;i--)
{
//Compare with Temporay Array
if(oTempArray[i] != true)
{
//Remove Value from list if not TRUE in Temporary Array
oSubPicklist.remove(i)
}
}
}

//****************************************************************
//**Notes:
// - Place code in the OnChange of the Main Picklist
// - In the array, you must have two values, so if there is
// only one value, then include the 0 (null) value
//****************************************************************
//**End of Non-Sequential Dynamic Picklist Code
//****************************************************************

Labels: , , , , , , , ,

Thursday, November 02, 2006

MS CRM 3.0.5 SDK

A very helpful resource is the Software Developer's Kit (SDK) from MS. Here is a link to the latest version that was released on 6/26/06:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9c178b68-3a06-4898-bc83-bd14b74308c5&DisplayLang=en

The SDK has samples of code for advanced functionality-all with syntax that has the blessing from Microsoft...which is always good because of the guarantee of compatability with the next version.

Labels: , , , , , ,

Wednesday, November 01, 2006

Running .Net Framework 1.1x and 2.0

I recently came across this problem of needing both .Net Frameworks on a crm server. When installing sql server 2005, .net 2.x is installed on the server. In order to "grandfather" the 1.1x on the server, you need to install the .net 1.1x framework before the sql server 2005.

Here are the links for .Net Framework 1.14

Microsoft .NET Framework Version 1.1 Redistributable Package
http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&DisplayLang=en

Microsoft .NET Framework 1.1 Service Pack 1
http://www.microsoft.com/downloads/details.aspx?FamilyID=a8f5654f-088e-40b2-bbdb-a83353618b38&DisplayLang=en

Labels: , , , , , , , , ,