Search code examples
dynamics-crm-2011workflow-activity

CRM 2011, Custom Workflow Configuration Parameters


I've written a custom-workflow for crm 2011 that works quite well. It renders a report and sends it via email to the members of a crm-team.

My problem is as follows: I need to add a webreference that points to the report-server. The URL of this report-server is automatically stored in the app.config file (I am using Visual Studio 2012). But as it seems this file is not registred in CRM 2011 when I deploy the package. (The workflow raises an error that the parameter cannot be found)

So I hardcoded the url, which is now not configurable any longer.

Furthermore there are some other parameters which I would like to be configurable (So I do not need to redeploy the package when something changes).

Is there a workaround for this problem?

Thanks in advance


Solution

  • Custom Workflow activities can't read the app.config (because only the .dll is stored when you register it)

    A solution is to add an input parameter inside your workflow activity, they can be set using the workflow designer inside CRM UI: http://msdn.microsoft.com/en-us/library/gg327842.aspx#AddingInput