Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

Dynamically set the 'ReferenceTarget' attribute for custom workflow activity in CRM 2011

$
0
0

I have a custom workflow activity that creates a record based on the input parameters passed (entityName and Name). Now, i want to be able to pass the created record as an output parameter. But to declare an OutArgument with EntityReference type, I have to set the ReferenceTarget attribute. Since I do not know which entity type is being created, I want to be able to set this attribute dynamically. When I try to use a property or variable inside the 'ReferenceTarget' attribute, it is not recognizing it.

How do i do this ? Please help.

[Input("Entity Name")]
public InArgument<string> EntityName { get; set; }
[Input("Name")]
public InArgument<string> Name { get; set; }
[Output("Created Record")]
[ReferenceTarget("contact")]     <<=== how do i set this dynamically??
public OutArgument<EntityReference> CreatedRecord { get; set; }


Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>