Facing 2 Min threshold issue (2-minute timeout exception) in the Async plugin in Dynamics 365 - dynamics-crm

In one of our CRM online environment, we have an asynchronous plugin which is deleting a NOTE(annotation) record by using the GUID of the notes.
This plugin is crashing due to the 2-minute timeout error which ideally should not be happened.
Can anybody share the possible reason behind this behavior?
Any help would much be appreciated.

This is a known limitation on plugins and custom workflow assemblies running in the sandbox environment.
ref: https://learn.microsoft.com/en-us/dynamics365/customer-engagement/developer/create-own-actions#watch-out-for-long-running-actions
As advised by the article above, use an external application to perform the action. Create a console application to delete the notes.

Related

I'm getting this error when opening any UI flow. Resource not found for the segment 'flowsessions' . Any idea why?

I'm getting this error when opening any UI flow. Resource not found for the segment 'flowsessions'.
I've created a flow which is calling a UI flow (web) which is failing with the same error.
UI Flow is not yet GA, still in Preview.
MSFT response in Forum clearly state that there are limitations & issues related to this error:
If you are using the UI Flow in a Flow, it will needs install on-premise gateway and the gateway only supported in default environment, so the UI Flow only supported in default environment, in the new environment you can only create it and test it.
The UI Flow still in preview, please wait until the feature is rolled out everywhere, be patient to some known issue solved.

Does ExecuteMultipleRequest work in Outlook offline mode?

I have a plugin ex:which updates all its child records when that is updated.
This plugin is registered to execute in offline mode as well.
I have done this using ExecuteMultipleRequest. This is working fine when I am updating the parent record from CRM instance.
When I go offline and try to update the parent record its throwing business process error "executemultiplemaxbatchsize".
I checked the exception with Debugging it is as below.
System.NotImplementedException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #ABA895C7
Does ExecuteMultipleRequest work in Outlook offline mode?
As per MSDN link https://msdn.microsoft.com/en-in/library/microsoft.xrm.sdk.messages.executemultiplerequest.aspx
it says
This message works regardless whether the caller is connected to the server or offline.
Per the SDK documentation it should but I think that is typo in the documentation. You can open a ticket with Microsoft and they'll probably correct the documentation but not change the functionality.
The reason I believe it's a documentation is is that there is NO reason to use ExecuteMultipleRequest in a plugin. Since there is no SOAP overhead or latency - because the plugin is running on the server and does not use the Organization.svc endpoint - you don't gain any benefit from using ExecuteMultipleRequest in a plugin. ExecuteMultipleRequest is intended for use in client applications to improve performance, not for plugins and workflows.

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.

Webhooks with Microsoft Dynamics CRM?

We have started to use Microsoft CRM for all our client information however we would like to have the most up to date information from CRM for internal tools.
The way we could do this is by running a tool that looks at the data every x minutes and keeps all updated records in the database.
Could someone give a explination on how we could use webhooks for this and if it actually is possible. This would be a lot more efficient to be notified when there is a change rather than checking all the time.
I have researched and found a few projects but they were all in beta - invite only or not available.
In Dynamics CRM Webhooks are not available as intended in the normal definition.
But you can use plugins to implement your notifications. From MSDN:
https://msdn.microsoft.com/en-us/library/gg328490.aspx
Another way to think about plug-ins is that they are handlers for
events fired by Microsoft Dynamics CRM. You can subscribe, or
register, a plug-in to a known set of events to have your code run
when the event occurs.

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