How to delete primary UI attribute from CRM

This question is not answered

We customized CRM 2011 system. We used some system entities and created some custom entities.

To create custom attributes in system entities, we modified customization XML, added new attributes directly in customization XML and imported that XML

but when we modified XML for one system entity (incident / case), at that time we made one mistake, we added new_name attribute and its primary UI attribute.

For case, now there are two primary UI attributes, we are trying to remove new_name attribute, but CRM throwing error

"Cannot delete Primary UI Attribute: new_name from Entity: Incident"

how can I remove this attribute from CRM system, also we noticed that when trying to filter out custom attributes in solution UI, CRM is not showing custom attributes in this view

 

All Replies
  • Sorry Mahadeo,

    I don't think you will be able to accomplish that...can you restore a backup?

  • Hi there,

    It is important to note that adding directly to the customizations.xml is not a supported method to add fields. I do not believe you will be able to remove this directly from the customizations.xml either. However, if you have a test environment, I would give this a try. Are you able to restore to a backup?

    Thank you for using Microsoft Dynamics CRM Communities,

    Dynamics CRM Support Blog

    Aaron Richards
    Sr. Support Engineer
    Microsoft Dynamics CRM

     

  • Hey ,

    Please perform following steps to switch primary field in entity. However this is unsupported way.

    1) Create a new attribute and publish it. (For e.g New_CRM_Field )

    2) Select the current primary attributes DisplayMask

    Select DisplayMask from MetadataSchema.Attribute where Name='Primay_CRM_Field'

    e.g 1006633344

    3) Select the new field attribute DisplayMask

    Select DisplayMask from MetadaSchema.Attribute where Name='New_CRM_Field'

    e.g 469762048

    4) Update the DisplayMask to the new field from current field.

    update MetadataSchema.Attribute set DisplayMask= 469762048 where Name='Primary_CRM_Field'

    update MetadataSchema.Attribute set DisplayMask= 1006633344 where Name='New_CRM_Field'5) Publish

    Hope this will help!

    Senthil Mani