How to return EntityCollection as Outparameter custom activity

杀马特。学长 韩版系。学妹 提交于 2019-12-10 18:43:13

问题


    [ReferenceTarget("contact")]
    public InOutArgument<EntityReference> PartyList{ get; set; }

How can I return/send a list of ActivityParty or a EntityCollection from a custom CodeActivity back to the workflow step?

Inside my execute method, when I return an EntityCollection or a List I get a type conversion error.


From the responses below - I wanted to add some clarification: How can I pass any collection back, I see the list is limited - I was looking for a workaround. Since EntityReference was a reference/pointer type


回答1:


EntityCollection is not in supported list of Input/Output type of Custom Workflow activities: MSDN

What you are trying to achieve by getting EntityCollection in WF step, it should be achievable inside WF activity itself.

You are getting conversion error because your output param type is EntityReference.




回答2:


You cannot use type EntityCollection in generic InOutArgument<T> properties.

Supported types are:

  • Boolean
  • DateTime
  • Decimal
  • Double
  • EntityReference
  • Int32
  • Money
  • OptionSetValue
  • String

See MSDN.



来源:https://stackoverflow.com/questions/47046596/how-to-return-entitycollection-as-outparameter-custom-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!