In Plug or workflow
You can get an entity's metadata from CRM by issueing a RetrieveEntityRequest
. In the response you get an EntityMetadata
object having an Attributes
collection providing all attribute details you need.
The CRM SDK contains clear example code on this topic. More information about working with attribute metadata can be found on MSDN.