locked
Default name attribute for custom entity RRS feed

  • Question

  • Hi,

    When we create a custom entity we are getting a default Name attribute. What is the use of it? Can i change the display name for it?

    Or, in fact can i delete it altogether? Will it have any impact?

    Thanks

    Friday, February 11, 2011 10:44 AM

Answers

  • The name of a record is often used to help users distinguish one record from another.

    The primary attribute of a custom entity is the Name attribute which can be specified when the entity is created. After the entity has been created you can make the attribute Not Required and remove it from the form and most (but not all views). I don't believe you can delete the Name attribute after the entity has been created because it's now the entity's primary attribute.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Friday, February 11, 2011 10:58 AM
    Moderator
  • Yes. Almost any field in CRM have have duplicate data. But if lots of records have the same name, it is very difficult for users to distinguish between them when using a lookup field, and impossible to import data using the Import Wizard when the parent records have duplicate names.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Friday, February 11, 2011 11:58 AM
    Moderator
  • Instead of "Primary" please call it "Default" attribute. It gets created so that when you add a lookup for it, you should have something to show there.

    All primary attributes in MS CRM are GUIDs and have the naming convention as 'entityid' (e.g. accountid, leadid, contactid, etc.)

    You can ofcourse set the properties of this default attribute when you are creating the entity. Just check the other tab and you'll see that it is going to create an attribute too which is called 'name'. Change it to whatever you wish.

    Its like MS CRM gives you the opportunity to create the special attribute while creating the entity which will best describe each record and will be visible in lookups and other places.


    - Arvind
    Friday, February 11, 2011 12:12 PM

All replies

  • The name of a record is often used to help users distinguish one record from another.

    The primary attribute of a custom entity is the Name attribute which can be specified when the entity is created. After the entity has been created you can make the attribute Not Required and remove it from the form and most (but not all views). I don't believe you can delete the Name attribute after the entity has been created because it's now the entity's primary attribute.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Friday, February 11, 2011 10:58 AM
    Moderator
  • Can this field have duplicate data?
    Friday, February 11, 2011 11:56 AM
  • Yes. Almost any field in CRM have have duplicate data. But if lots of records have the same name, it is very difficult for users to distinguish between them when using a lookup field, and impossible to import data using the Import Wizard when the parent records have duplicate names.


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Friday, February 11, 2011 11:58 AM
    Moderator
  • Thanks for that Neil.

    But sorry, i am still unable to digest what is the specific use of the Primary Attribute. Could you please elaborate the usage of it.

    Many Thanks

    Friday, February 11, 2011 12:03 PM
  • Instead of "Primary" please call it "Default" attribute. It gets created so that when you add a lookup for it, you should have something to show there.

    All primary attributes in MS CRM are GUIDs and have the naming convention as 'entityid' (e.g. accountid, leadid, contactid, etc.)

    You can ofcourse set the properties of this default attribute when you are creating the entity. Just check the other tab and you'll see that it is going to create an attribute too which is called 'name'. Change it to whatever you wish.

    Its like MS CRM gives you the opportunity to create the special attribute while creating the entity which will best describe each record and will be visible in lookups and other places.


    - Arvind
    Friday, February 11, 2011 12:12 PM
  • Oh, now it is pretty clear Arvind. Thanks for that.
    Friday, February 11, 2011 12:17 PM
  • Hi,

    Is there a way to change the default attribute (name) that is visible in the lookups, for another attribute to shown on the related entities??

    Thanks!

    Luis

    Tuesday, March 8, 2011 1:41 PM
  • No, unfortunately not without recreating the entity. But you can rename the attributes and swap the data around which might be easier. 

    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Tuesday, March 8, 2011 1:47 PM
    Moderator
  • Thanks for the answer!

    But, how can I rename the attributes without recreating the entity??

    The actual scenario is this:

    We have a personalized entity with the attribute: new_name, and this attribute is used in another development (.Net), but we need to show on the lookups the information of the field: new_firstname, and we can't switch the data, because the development use it.

    Thanks!!

     

    Tuesday, March 8, 2011 2:16 PM
  • You can rename the display names but not the schema names of attributes. So you could move all the data from the new_firstname attribute to the new_name field and then rename the new_name's display name to First Name and delete new_firstname.

    But, of course, your development team will have to redevelop whatever they've developed that used new_firstname because your design has changed. Not sure how you're going to keep everyone happy :(


    Neil Benson, CRM Addict and MVP at Customery Ltd. You can reach me on LinkedIn or Twitter. Join over 10,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Tuesday, March 8, 2011 2:23 PM
    Moderator
  • Yes! that's the issue!

    I found an alternative way to walk around this, using a javascript... i'll see if works.

    http://blogs.msdn.com/b/paf/archive/2009/04/22/how-to-display-related-entity-fields-in-a-crm-lookup-attribute-instead-of-the-primary-entity-field.aspx

    Thanks for your help!

    Luis

    Tuesday, March 8, 2011 3:34 PM