Configuration data for a custom workflow activity - dynamics-crm

When deploying plug-ins for MS Dynamics CRM, using the CRM plugin registration tool, you can set secure and unsecure configuration values. You can the setup a constructor to access these values in a plug-in. Is this or something similar available to custom workflow activities? If so, how is it used?

Sadly, there is nothing comparable for workflow activities.
For this purpose, we usually define input parameters for the workflow activies. The configuration is then entered in the workflow designer.

Related

Not able to set queue in from in email activity in Dynamics 365 using workflow

I'm trying to set a queue in from recipient using a custom workflow when creating an email.
The workflow runs correctly in the sandbox pattern but does not work in the production method.
I've checked my workflow, it works fine, but the queue reference is automatically removed after email creation. The same behavior occurs when I create an email from Dynamics CRM.
Thanks!
The problem will be that the queue's entity reference will change between your Sandbox and Production environments.
The workflow stores the entity reference with the underlying Guid and will not be able to reference the production Queue because the ID will be different.
You might find that if you deactivate the workflow you can't re-activate it because the references are missing.
To fix it you either need to manually modify your workflow to have the correct reference or use a configuration entity which will have a look up to the queue you want to send as and then have a coded workflow activity to retrieve the entity reference.
Means you can configure the workflow values between environments.

Connecting JIRA and MS Dynamics

I am .NET developer and new to both JIRA and MS Dynamics API development. Recently I got a task to integrate JIRA and MS Dynamics. Basically I need to update JIRA Issue time tracking Information to Dynamics. And also need to share some Dynamics Information on JIRA.
Possible approaches to solve this problem.
Write JIRA plugin to Connect with Dynamics via WEB API. (This approach need Java development Experience)
Write Dynamics extension to communicate with JIRA through JIRA web service
Write Scheduled task to synchronize JIRA and Dynamics using JIRA and Dynamics web services
Develop ASP.NET web site and use JIRA and Dynamics Webhooks to synchronize
I am thinking of write a scheduled task or use Webhooks to achieve this task. Is there any other way to achieve this task? What is the best possible approach to sync JIRA and MS Dynamics.
If you are updating issues only one way (JIRA to CRM) then you can't do this with CRM plugin. Also I don't see how you could do this with ASP.NET website (I mean without any user action on this site). If you need most current data in CRM then best option would be JIRA plugin if not then sheduled task.
I've more or less always seen people go with #3 when having to sync CRM (usually with ERPs like NAV or SAP). We too code custom programs to be scheduled in order to do the syncing.
Or you could buy Scribe, which allegedly syncs anything with anything... No hands-on experience on that, but I know it's used by big companies so it should work.

Dynamics CRM 2013 custom action and process entity privilege

We recently faced an issue with Process entity privilege which could well be a design problem in Dynamics CRM itself. Or may be we're doing something we're not supposed to.
As you all know Process is a common entity for new Custom Action feature and the original Workflows. We used a few custom actions in the system to improve form load performance and make some processes transaction aware.
The problem is that users need organization level read access on Process entity to make a call to these custom actions which is ridiculous. There was a requirement for users to have limited access to workflows but since the custom actions and workflows share the same privilege through Process entity, this is impossible to fulfill.
For server side custom pages and plugins we can impersonate as a privileged user but most of these custom actions are being called from JavaScript (we used it to speed up form load by aggregating queries into single web service call)
Is there a way we can limit users access to workflow and still be able to let them call custom actions?
Another question is that are custom actions not meant to be used in this way? Which, if no, would makes custom actions quite useless.
Thanks in advance!

Custom workflow vs Configurable workflow in mscrm dynamics

There are two type of workflow available in the mscrm dynamics. 1. Configurable workflow 2. Custom workflow.
My Question :
In which scenerio, we use the custom workflow ?
How custom workflow are different from plug ins ?
1) You must differentiate between "custom workflow step(=custom workflow activities)" and "Custom XAML workflows" (just for the sake of completeness):
You use a custom workflow activity (thats a custom workflow step written in c#) if non of the standard workflow steps fit your needs and you do not can use a plugin (see below). Custom workflow steps are especially helpful if they represent a generic functionality which can be reused.
You use a Custom XAML workflows if you want to use the full power of the windows workflow Foundation instead of the limit subset which the dynamics crm workflow designer provides. You must develop the Custom XAML workflows outside of crm (in visual studio for example) and then deploy it into crm. But beware: You cannot edit it inside crm and you cannot use Custom XAML workflows in the crm cloud (=crm online). You also have to enable Custom XAML workflows in the crm config database (they are disabled by default).
I would recommend against Custom XAML workflows, they are not very well supported/integrated into crm and they are error prone.. Use Plugins or a combination of custom workflow activities instead. Another option is to write a c# windows service which connects to crm and accomplish the desired functionality from outside.
2) It depends if you are using Dynamics 2011 or 2013/online. In 2011 Workflows are always asynchronous. They can be triggered automatically by a trigger (create entity for example) or manually by the user. In the first case they run under the userid of their respective owner, in the second case they run under the userid of the user which starts the workflow. Plugin can run synchronous or asynchronous and they are capable of doing user impersonation. But they cannot directly be triggered from the user. Workflows are suitable for long running stateful persistent background operations, Plugin for stateless short running operations.
If you are using crm dynamics 2013 then workflows can also run synchronous.
Only synchronous operations can present error messages to the user.
We have to use custom workflow actions when it is not enough standard workflow actions.
https://community.dynamics.com/crm/b/crmpowerobjects/archive/2013/05/28/comparison-using-workflows-vs-javascript-vs-plugins-in-dynamics-crm.aspx
Step by step creating custom work flow -
http://mahenderpal.wordpress.com/2012/08/26/step-by-step-creating-custom-workflow-in-microsoft-crm-2011/
It specifies a scenario also.
For around Dynamics crm follow -
http://niiranen.eu/crm/2013/10/getting-your-head-around-dynamics-crm-2013-processes/

Data exchange between two Organization in MS CRM

Is there any way through which I can exchange data between two organization.
I want to do my coding in Plugin only. Can we write a code in plugin by which it accesses/manipulates the data of a different org through web services only and not directly hitting its database.
In know the orgs are different worker groups. Just wanted to know if its possible or if there is any other technique.
Thanks in advance.
The data for each CRM organisation is exposed via web services which differ slightly for CRM 2011 and CRM 4. The best thing to do is download the latest version of the SDK for the target platform as there are several examples in there for plugins and service based operations.
From your plugin you will be able to access the other organisation via this service and a connection to the service for the "local organisation in which the plugin is running will be available from the IExecutionContext parameter passed to your plugin. Any operations you carry out across both orgs will not be transactional though.
Also be sure to take a look at the sync and async options available for the plugins. If their use is appropriate for your scenario consider using an async plugin for the updates to the target org to minimise their effect on the source org.
Plug-ins will work. Hitting the database directly is actually not a supported model anyways. You can also think of using BizTalk as the middleware.

Resources