Export (0) Print
Expand All

attribute Element

CRM 1.2
banner art

Contains the details of an attribute for an entity.

Number of occurrences Zero or more
Parent elements attributes in entity element.
Child elements See below.

Elements

Name Description Notes
AggregateOf For internal use only. Optional

String

Max: 50 chars

AttributeOf For logical attributes, this node determines which attribute a logical attribute extends. Optional

Read Only

String

Max: 50 chars

ColumnNumber For internal use only. Optional

Positive Integer

DefaultValue Determines the default value to use during creates for this attribute if it is not provided by the user. Optional

Read Only

String

Description A string that describes an attribute, its purpose and its intended use. This string is only displayed to system administrators and customizers who are able to access the entity customization tools of Microsoft CRM. It is a best practice to provide this information so that system administrators understand the purpose and intended use of a particular attribute. Optional

String

DisplayMask Specifies a string that contains settings for the field. Example: "ValidForAdvancedFind|ValidForForm|ValidForGrid"

Valid Values:

ValidForAdvancedFind
ValidForForm
ValidForGrid
RequiredForGrid
RequiredForForm

Optional

String

IsCustomField Determines whether or not this field is a custom field added by a user. Custom fields added in v1.x and migrated forward will have one of the following prefixes:
  • CFS_ - String
  • CFP_ - Picklist
  • CFB_ - Boolean
  • CFI_ - Integer

Custom fields added in v3.0 have a prefix that is customizable. The default is "New_".

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

IsLogical Determines if the attribute is "logical". Logical attributes are generated at runtime and are not actually stored in the database. An example of a logical attribute is that for a Picklist attribute named "MyCode", there will be a corresponding "MyCodeName" field that is logical. The code field would hold the integer value of the picklist and the name field would hold the display string for that value.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

IsNullable Determines if the field supports NULL values. This maps directly to the SQL field property "Allow Nulls". Optional

Read Only

IsPKAttribute Determines if this attribute is a primary key. This means that that the field represents the ID of another entity instance. Create new primary key attributes is not supported.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

IsSortAttribute For attributes that are extended with logical attributes, this node determines which logical attribute should be used to sort when a sort is requested against the "base" attribute.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

Length The maximum length that the attribute value should be. Only supported on the NVarChar data type. The application can enforce maximum lengths on all text and memo fields using client-side logic. Optional

Positive Integer

LogicalName For internal use only. Optional

String

Max: 50

Name For internal use only. Optional

String

Max: 50

ReferencedEntityObjectTypeCode The type code of the entity that the attribute links to. In general, when the attribute is a foreign key to another entity, this will let the system know what type of entity to JOIN to.

See Entity Type Codes.

Optional

Read Only

Positive Integer

RelationshipName For internal use only. Optional

String

RemoteAttributeName For internal use only. Optional

String

Max: 50 chars

RequiresPlatformAuthorization Determines if this attribute requires special platform validation.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

Type The data type of the field. For more information, see Using CRM Attribute Types.

Valid values:

bigint
binary
bit
char
customer
datetime
decimal
float
image
int
lookup
money
nchar
ntext
numeric
nvarchar
owner
partylist
picklist
primarykey
real
smalldatetime
smallint
smallmoney
sql_variant
state
status
text
timestamp
timezone
tinyint
uniqueidentifier
varbinary
varchar
virtual

Optional

Read Only

ValidForCreateAPI Determines if this attribute is "Valid for Create". This means that that the platform will allow this field to be provided by and persisted for the user during a create operation. If this field is provided during a create operation and this value is not true, the platform will throw an exception.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

ValidForReadAPI Determines if this attribute is "Valid for Read". This means that that the platform will allow this field to be retrieved by the user during a retrieve operation. If this field is requested during a retrieve operation and this value is not true, the platform will throw an exception.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

ValidForUpdateAPI Determines if this attribute is "Valid for Update". This means that that the platform will allow this field to be provided by and persisted for the user during an update operation. If this field is provided during an update operation and this value is not true, the platform will throw an exception.

Valid values:

"0" – false
"1" - true

Optional

Read Only

String

XmlAbbreviation For internal use only. Optional

Read Only

String


Attributes

PhyscialName

Required. Read-only. The schema name of the field in the SQL table stored within the MSCRM database.

Remarks

This information should be edited by using the Microsoft CRM customization tools in the Web application. Editing of existing nodes is not supported and may have unexpected and unrecoverable results.

Example

The following example shows the use of the attribute element.

<attributes>
   <attribute PhysicalName="AccountCategoryCode">
      <Type>picklist</Type>
      <ValidForCreateApi>1</ValidForCreateApi>
      <ValidForUpdateApi>1</ValidForUpdateApi>
      <ValidForReadApi>1</ValidForReadApi>
      <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>
      <Description>Drop-down list for selecting the category of the account.</Description>
   </attribute>
</attributes>

See Also

Customization File Reference


© 2007 Microsoft Corporation. All rights reserved.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft