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; }