The CRM Metabase web service allows you to retrieve Entity and Attribute information. If you’ve ever retrieved Entity information you may have noticed some interesting things about the list of attributes returned.
Some of the attributes you will see are not normally displayed in the list of attributes you see when viewing the Entity from within the CRM user interface.
I call these attributes the ‘Of’ attributes because they have properties that end with ‘Of' and are related to, or based on, other attributes.
If we explore the CRM AttributeMetadata class you will see the following three properties:
AggregateOf
Gets the name of the attribute that aggregates the value of this property.
AttributeOf
Gets the name of that attribute that this attribute extends.
CalculationOf
The SDK description says 'For internal use only, but attributes with this property typically contain currency data.
Here are examples of ‘Of’ Attributes:
From the Contact Entity:
| Attribute Name | Attribute Of |
| parentcustomeridname | parentcustomerid |
| donotbulkemailname | donotbulkemail |
From the Account Entity:
| Attribute Name | Calculation Of |
| Aging60_Base | Aging60 |
| Revenue_Base | Revenue |
From the Contact Entity:
| Attribute Name | Aggregate Of |
| owningteam | ownerid |
| accountid | parentcustomerid |
So why is this important to me?
Well, that depends on what you are doing with the Metabase. If you are producing documentation, these attributes may or may not me useful to you.
If you are using the Metabase web services to delete attributes, then these attributes are of no use to you because they can’t be deleted since they are maintained internally by CRM. If you delete the ‘parent’ attribute, the related attribute is also deleted. If you attempt to delete the internally generated attribute, you’ll receive an error.
Checking for ‘Of’ attributes
Here is how you check for ‘Of’ attributes using code:
AttributeMetadata attribute = entityResponse.EntityMetadata.Attributes[0]; if ( (attribute.AttributeOf == null) && (attribute.AggregateOf == null) && (attribute.CalculationOf == null) ) { // do something interesting }







[...] The CRM Metabase web service Posted on July 12, 2010 by roman20007 Exploring the CRM Metabase and Those ‘Of’ Attributes [...]