Search code examples
dynamics-crmcrmdynamics-crm-4

How to retrieve Attribute Display name from CRM 4.0 Plugin


How can I get the Display name of Custom Attribute from CRM Plugin? This code doesn't give me the name. Please let me know. Thank you

            DynamicEntity entity = (DynamicEntity)context.InputParameters.Properties["Target"];
            String str = (String)entity.Properties["name"];

Solution

  • You'll have to make a call to the MetadataService to get the AttributeMetadata which has a DisplayName property.