An attribute with the specified name already exists

We know there are many out of the box fields created when we create a custom entity, but do you know when you create specific data type fields, some hidden fields are created using the field name. Today we are going to discuss that.

Let say we need to create two fields first one “Location” in my entity and that is lookup, which is pointing to another custom entity called “Location”. Second field we need to create called “Location Name” of single line of text. When we will try to create second field after creating Location field we will get following error
do you know1

This could be confusing as we don’t any field with this name in our entity :). Actually when we create specific type of fields, D365 created some hidden field automatically. One way to see hidden field is create a SSRS report and get all attributes for your entity for example I am getting account fields.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<all-attributes />


In above screenshot I have highlighted some of the field which are created automatically. Now if you really want to create field, you need to use some other logical name for your field (manually change logical name field while creating field) and you can keep display name as we want like below

So we know now there some hidden field created for some of the datatype fields.

Hope it will help someone !!
Keep learning and Keep Sharing !!

Leave a Reply

Your email address will not be published. Required fields are marked *