Question

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

Was it helpful?

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

OTHER TIPS

thanks for the suggestion. I was aware of the opportunity you suggested (I am already using input parameters in my workflow).

But in my opinion, configuration parameters that need a specific knowledge (system admin), the input parameters of a workflow are not the appropriate place.

I've found another solution: Adding a XML-Webresource to my project, where configuration parameters are stored and retrieved by the workflow.

thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top