Friday, December 16, 2011

CRM 2011 Data Import - Creating custom entities and fields

When building a custom solution, chances are that new entities with multiple fields are going to be created. In this post I am going to take a look at the Data Import wizard in crm 2011 and use it to accomplish those goals. Data can be imported too if needed, but the focus now is going to be able to create new entities and fields quickly. It is also a good idea to have a re-usable data maps to reproduce the process in a new organization.

A few things to note before we start:
a. The import size limit using the CRM 2011 data import wizard is 8 MB, irrespective of the file format.
b. Column names cannot have special characters
c. Enclose data in quotes( " ) if it contains special characters.

The business case is to create a new entity called Events. The fields are Event Name (text), Event Type (optionset), Status (optionset), Account (lookup), From (date), To (date).

1. Open a excel worksheet. The first row should contain the column names. This is the setup I have (remember that for lookup data import, the name should be an exact match). Save the file in csv format.

Thursday, December 1, 2011

OData with JSON - Getting related values from a lookup field in CRM 2011

One of the most common methods to improve user experience is to intelligently fill values out in a form based on previous selections. In this post, I will walk through a business case that provides for quick data entry in a form.

I have a contact lookup and a section called address with multiple fields like street name, city, zipcode, state, country etc. The goal is to fill out the values of the address fields with the contacts details. These values are updated when the contact is changed, but the address section can be over written by the user.

1. Before we start writing js code, the first step is to find the name of the Set that we will be using in our call. You can get all the names by going to a similar url (the example is for on premise, but can be used for Crm online by replacing the server name/ organization section with the right value)