Pass a parameter to a CRM 2011 Workflow via the API

无人久伴 提交于 2019-12-01 21:24:52
Grigory

Workflows don't take parameters.

Dialogs take parameters, which are generally passed from other dialogs or queries.

The only thing I managed to do is to pass a related entity from parent workflow as the primary entity to a child workflow.

I'm going to retract my earlier answer and upvote @Grigory instead.

See this page from the SDK

Note Due to the interactive nature of the dialog process, you cannot run a dialog using the Microsoft Dynamics CRM SDK. A dialog can only be run through the Microsoft Dynamics CRM Web application and are not supported in Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access.


I don't know the answer, but I'd be fairly confident that this is:

  • Possible
  • Unsupported (as it is not documented in the SDK)

If I really needed to find out then I'd write a plugin to explore what happens when a workflow is fired internally (this makes an assumption that such a message is fired via the plugin pipeline - not necessarily a correct assumption).

I'd register this plugin on all stages of the Execute message (I assume) and then use debug logging or an interactive debug session (attached to the Async service) to examine the InputParameters (and maybe OutputParameters and ExtensionData) of the ExecuteWorkflowRequest that is (hopefully) generated when CRM runs a workflow that does have parameters. I expect that one of those PropertyBags will contain some sort of parameter.

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