---
schema_version: "1"
id: 48d015eca7ee98f6cb33bcd7bd6fa606fbf83a024bb4b23ca48ec93f7145d72b
title: DescribeMscrmEntityAttributes()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/microsoft-dynamics-crm/mc-ampscript-reference-microsoft-dynamics-crm-describe-entity-attributes.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-mscrm/mc-ampscript-reference-microsoft-dynamics-crm-describe-entity-attributes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 718c1f2e2e20bb994ac2bc46d120e598a5776bd3cde6a99b87d28d51b10c7551
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# DescribeMscrmEntityAttributes()

Retrieves information about the attributes of a Microsoft Dynamics CRM entity. This information includes the logical name, display name, and type of the attribute.

If an attribute contains a Boolean, status, picklist, or state value, the function returns a comma-separated list of option and display values.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
DescribeMscrmEntityAttributes(entityName)
```

The `DescribeMscrmEntityAttributes()` function has one parameter:

- `entityName` (string): Required. The name of the Microsoft Dynamics CRM entity to retrieve attributes from.

## Usage

This example retrieves information about the attributes of the Lead entity in Microsoft Dynamics CRM.

```
%%[ Var @fields_rs Set @fields_rs = DescribeMscrmEntityAttributes('Lead') ]%%

<table>
  <tr>
    <th>Field Name</th>
    <th>Display Name</th>
    <th>Type</th>
    <th>Required</th>
    <th>Options</th>
  </tr>
  %%[
    Var @field_name, @field_displayname, @counter, @field_type, @field_required, @field_options
    For @counter = 1 to rowcount(@fields_rs) do
      Set @field_name = Field(row(@fields_rs,@counter), 'Name')
      Set @field_displayname = Field(row(@fields_rs,@counter), 'DisplayName')
      Set @field_type = Field(row(@fields_rs,@counter), 'Type')
      Set @field_required = Field(row(@fields_rs,@counter), 'Required')
      Set @field_options = Field(row(@fields_rs,@counter), 'Options')
  ]%%
  <tr>
    <td>%%=v(@field_name)=%%</td>
    <td>%%=v(@field_displayname)=%%</td>
    <td>%%=v(@field_type)=%%</td>
    <td>%%=v(@field_required)=%%</td>
    <td>%%=v(@field_options)=%%</td>
  </tr>
  %%[ Next @counter ]%%
</table>
```

The example outputs a table that provides the field name, display name, field type, required status, and field options for each attribute in the Lead entity.
