Modifying the fullname

The fullname of a contact is always "firstname lastname". Right? Well, did you know that you can modify this? Go to Settings, System Settings. There you can modify this setting to some other options!

Great :) So lets modify the fullname to "lastname, firstname". When saving this setting, CRM warns you that this only works for the new entities and not for the existing entities. If this really is a problem, then you can go into SQL and update the fullname manually. Here's the code to update the contacttable:

UPDATE contactbase SET fullname = ISNULL(lastname, '') + ', ' + ISNULL(firstname, '')

Of course you can update the contactbase with other values for the fullname as well.

Keep in mind that you NEVER update the Contact view, always the contactbase. Updating the contact view will cause problems.

Anyway, you should always make a backup of your database before making any modification to the database.


Anonymous said...

I can't seem to get this work, SQL Query returns- invalid column name ') +','+

What could be wrong?

Ronald Lemmen said...


I just tested the query by doing a copy and paste. When I run this query to the database ending on MSCRM using the SQL Server 2005 Management Console, then it works like a charm.

Is this what you are doing as well? If so, then what is the language of your install? What is your SQL server version? Could you paste your query?

Kind regards,


kale said...

Ronald, have you ever run into a situation where CRM won't let you change this setting? If I choose "Last Name, First Name" it gives me the pop warning, but after clicking on Ok and going back in it is set back to "First Name Last Name" and if I add a new contact I get that as well. Seems like it is stuck in this mode.

Ronald Lemmen said...

Hi Kale,

Take a look at this kb article and please inform me if it solved your issue:

Good luck!


cheerchap said...

Hi Ronald, I have to modify fullname that should display suffix after last name e.g. first last name , suffix, first name i.e. Aaronson, Jr., Russell and Agnone, III, Eugene, were Jr. and III are suffix, can you guide regarding this, how to implement this , thanks

John said...

Hi Ronald,

I have the same issue as "cheerchap said..."

What could be Suggestion/Sol'n?

Kind regards,

Ronald Lemmen said...

There is no way to change the generation of full name to any other format then Microsoft has decided for us. If you want to do this, then you should add a new attribute like "Custom fullname" and generate the value for this in a javascript or callout (plugin) code.

Hope this helps,


Anonymous said...

Using SQL server After trigger.

It is possible to change the fullname by adding an after trigger which updates the fullname to anything you like.

Something like this in the trigger :

Update LeadBase Set Fullname=firstname From LeadBase LB INNER JOIN inserted II ON II.LeadId=LB.LeadID