I would like to write a Custom Workflow Activity which will return a value from a parent object from the parent object of an entity. For example I am on Entity A here I have a lookup field to Entity B and here I have a lookup field to Entity c. On Entity c there is a given field which value I want to return.
Is it possible to make a generic output type, so that the Custom Workflow Activity can either return a lookup or any other supported datatype?
Thanks!
It is not possible to add an OutArgument<T>
of any type other than the supported types (as listed on MSDN).
I see two workarounds:
OutArgument<string>
and store a serialized EntityReference
object in it. Downside of this approach is that your parameter can only be consumed by another custom workflow activity.OutArgument<EntityReference>
for every entity type your workflow activity needs to support. If you are lucky you only need a few.