Using CrmReferenceTarget Attribute
banner art

Some property types require that you specify the entity type being referenced. The following type requires a CrmReferenceTargetAttribute attribute.

Type
Lookup

Example

The following example shows adding the input and output attributes to a Lookup property used in a custom workflow activity with the addition of the CrmReferenceTarget attribute.

public static DependencyProperty myLookupProperty = DependencyProperty.Register("myLookup", typeof(Lookup), typeof(NoOpActivity));

[CrmInput("My Lookup")]
[CrmReferenceTarget("account")]
[CrmOutput("My Lookup Output")]
public Lookup myLookup
{
    get
    {
return (Lookup)base.GetValue(myLookupProperty);
    }
    set
    {
base.SetValue(myLookupProperty, value);
    }
}

See Also

Concepts


© 2009 Microsoft Corporation. All rights reserved.


Page view tracker