[D365 CE Online] Debug Async Plug-in using “Persist to Entity” profiler option

Rajeev Pentyala - Dynamics 365 Blog

As you are aware, using Plug-in Profiler option we can debug D365 online plug-ins by throwing exception and capturing the Serilaized profile. Refer my previous article

With the ‘Exception’ profiling option, you first need to trigger the event and capture the exception log. For example, if you need to debug “Post Account Create” plug-in, you first need to trigger the event (i.e., Create Account from D365 application) and capture the exception log. This ‘Exception’ option would be apt, if your plug-in registered in Sync mode.

What if your plug-in is Async? Answer is, using “Persist to Entity” profiler option.

Plugin Profile 1

Let’s see how to debug Async Plug-in step by step.

Configuring Profiler in Plugin Registration Tool:

  • Connect to your Dynamics instance using Plug-in registration tool.
  • Click on ‘Install Profiler’ button
  • Register a new plug-in assembly and add an Async step
    • In this article, I registered an Async step on Post…

View original post 197 more words


Unexpected error (SQL Timeout error) while trying to delete Audit Log

Unexpected error (SQL Timeout error) while trying to delete Audit Log

We had around 200 GB of Audit Log data in our Production Environment (Online), but while trying to delete it through Audit Log Management resulted into unexpected error.

The only option is to raise the support ticket with Microsoft. We also raised the same but it unfortunately resulted in our Production Server being down for brief period of time because of time out issue while performing the operation in Audit Base.

So, in short if we are facing issue while deleting log ourselves, we need to raise the support ticket and also the plan the same during downtime or weekends when users are not using the system.

Hope it helps..

How To Access Master & Duplicate Record In Merge Operation Plugin

Passion Dynamics

Here is a quick blog on how to access master & child records during a Merge operation in a plugin.

I recently had to develop a plugin where in I needed to do some manipulation with the records being merged.

You can access three entities in your plugin when a record is merged from Context.InputParameter : 

       1. SubordinateId – the duplicate record
       2. Target – the master record
       3. UpdateContent   – a temp entity contains the final attribute as outcome of the merge operation.

To Access them in the code simply do this:

Entity duplicate = context.InputParameters[“SubordinateId“]; // To access the duplicate record simply retrieve the attributes using service.retrieve and by proving the duplicate.Id.

EntityReference target= (EntityReference)context.InputParameters[“Target“];

Entity finalRecord = context.InputParameters[“UpdateContent“]; //To access the final record simply retrieve the attributes using service.retrieve and…

View original post 10 more words

Requesting the backup of Microsoft Dynamics 365 Online Database

In theory, requesting the backup of the online database seems very easy and straightforward. We basically need to raise a support ticket with Microsoft and provide the following details.

  • SQL Version – Standard or Enterprise
  • SQL Year of the version. In our case it was (Microsoft SQL Server 2016 (SP1) (KB3182545) – 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2016 Datacenter 6.3 <X64> (Build 14393)
  • Global Admin E-mail Address – to who the backup will be shared.

We had requested the same, some 3 weeks back. In our case, the Database size of our production was around 600 GB out of which 200 GB were occupied by Audit Data. For some business-specific reason, we wanted to have the backup of Audit Data with us before we delete it. Now, this Audit has a separate story with it, when we tried deleting it from UI we got the SQL Time Out issue and on raising the support ticket when Support Team tried the same through back end it, resulted in our Production Server being down briefly for few minutes. We also tried to take the back up through 3rd party tools using SSIS, however again we ran into some issue where the tool was not able to pull the Audit Data for few of the entities.

Well to cut the story short, it is around 21 days after we raised the request, and we are yet to receive the backup of our production database, we have been told that support team is actively working on it and it is because of the large size of the organization.

Will keep posting the update on the backup and the Audit deletion.

The purpose of this blog post was to share that certain things might seem straightforward and would have taken maximum few hours, could still run into issues and challenges causing delays. So, when we plan for it we need to aware of these factors as well.

Hope it helps..

Azure: Execute Stored Procedure using Azure Data Factory

Ajit Patra

In this blog post, we’ll see how to execute Stored Procedure in Azure SQL Database inside Azure SQL Server. Let’s go through the steps to see it in action.

  • Login to Azure Portal.
  • Click Create a resource –> Databases –> SQL Database.

  • Give a unique name to the Azure SQL Database. Click on Server field to create Azure SQL Server on the fly. 
  • Give a unique name to the Azure SQL Server, provide credential for login and click Select.

  • Make sure the Azure SQL Server that we just created is selected as Server while creating Azure SQL Database. Fill the mandatory fields and click Create.

  • Let’s connect to the Azure SQL Server using SSMS. On clicking Connect a new pop up will open where we need to put Azure subscription credential to login.

  • Using Azure subscription credential we need to create a firewall rule so that…

View original post 272 more words

SSIS and Microsoft Dynamics 365

Listing down the posts on SSIS and Microsoft Dynamics 365 for quick reference