Using CrmAttributeTarget Attribute for Picklist or Status Types
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
Some property types require that you specify the entity and attribute being referenced. The following types require a CrmAttributeTargetAttribute attribute.
| Type |
| Picklist |
| Status |
Example
The following example shows adding the input and output attributes to a Picklist property used in a custom workflow activity with the addition of the CrmAttributeTarget attribute.
public static DependencyProperty myPicklistProperty = DependencyProperty.Register("myPicklist", typeof(Picklist), typeof(NoOpActivity));
[CrmInput("My Picklist")]
[CrmAttributeTarget("account", "industrycode")]
[CrmOutput("My Picklist Output")]
public Picklist myPicklist
{
get
{
return (Picklist)base.GetValue(myPicklistProperty);
}
set
{
base.SetValue(myPicklistProperty, value);
}
}
See Also
Concepts
Other Resources
.gif)