As a Solution Architect I often review Microsoft Dynamics 365 custom server and client side code.
One of the most common rejects regards tracing and exception handling mechanisms, or their absence. Some code constructs may have empty Try/Catch blocks or none at all, other catch exceptions and just re-throw. As for tracing, code often contains debugging ‘aids’ such as alerts and debugger statements or no tracing notifications at all.
Why is this a reject?
Unhandled raw exceptions float to UI, confusing and frustrating users while exposing internal implementation details to potential attackers
System Administrator is unaware of custom code exceptions unless users decide...
Finally found the time for overdue maintenance on the Drag & Drop solution I created two years ago.
First of all, as the CodePlex platform, previous home of this solution, is being decommissioned, downloading the component got the whole CodePlex project and few visitors commented that they could not find the actual solution.
So now you can download an unmanaged solution from it’s new home @ Github.
Second, I fixed a major bug related to the plural name of some entities.
For most entities, appending ‘s’ to the entity schema name would result in the matching entity name for Web API. Some...
In part 1 of this post I demonstrated building and using a service which receives a FetchXML query and returns Dynamics 365 data to any Portal page in an asynchronous manner as a JSON object. This service is similar to the SDK’s RetrieveMultiple message.
In this part 2, I’ll demonstrate a different service, which like the SDK Retrieve message, receives a record type, record id (GUID) and columns set to return the required data as a JSON object.
This is useful when you already have a specific Dynamics 365 record id at hand and you want to retrieve additional data for...
Leveraging Colin Vermander brilliant article on using Liquid Templates to return JSON, I would like to demonstrate creating and using a ‘service’ to asynchronously retrieve Dynamics 365 data into any portal page.
Why is this useful?
Liquid Templates tags are rendered on server side before a response is returned to the browser, so FetchXML tag will return a static result once the page is returned.
But what about responding dynamically to client side events such as option selection, button click or expending an element to view more details?
Sending the page to the server again is no longer an option if you want...
The requirement for recurring job execution is quite common in Microsoft Dynamics implementations. Here are some of the business requirements I have encountered:
Send monthly newsletter to target customers
Synchronize MSCRM Users details with Active Directory once a day
Once a month, disqualify all leads that have no open activities
Once every hour, export Appointments from mail server and import into Dynamics 365
Microsoft Dynamics 365 has no reliable built in scheduling mechanism that can be leveraged for custom solutions. The Asynchronous Batch Process Pattern I have written about in the past can be used with daily...
Azure Function is a fantastic mechanism for various integration scenarios. Here are few key characteristics:
Being a serverless application, Azure Function has the best time to market when it comes to deploying a web service
Pay-per-use pricing model means you pay only for what you use
Built in integration options in PowerApps and Flow allows you to give non-developers new building blocks when designing application and processes
CORS (Cross-Origin Resource Sharing) support allows consuming Functions from server/client side in any domain you find suitable
What can you do with Azure Functions in the context of Microsoft Dynamics integration scenarios? Just about anything:
Export/Import data to/from...
In the previous post, I walked through the ABP Target Records Scenario. In this post, I’ll go through the Aggregative Query Scenario. Prerequisites 1. Download the Asynchronous Batch Process Solution, import into Microsoft Dynamics CRM 2015 on-premise/Online organization2. Go to Settings – > Solutions and Open the ABP solution. Go to the Batch Process entity definition and check the Settings checkbox in the ‘Areas that display this entity’ section3. Save and publish the solution As always, I advise against publishing any external solution on your production environment without testing it first. Aggregative Query Scenario ...
In the previous post I described a solution to the business problem of logging & handling implementation level exceptions (presented in the first post of this series).
In this post, I will supply an actual solution, demonstrate common usage scenarios and other solution features.
Before I walkthrough usage scenarios, some implementation notes:
In order to support exceptions raised from transactional components (such as Plugin registered to pre/post operation stages), the LogException method in ExceptionManagement.cs file is using the ExecuteMultipleRequest class to execute the e4d_LogExceptionRequest request. As the ExecuteMultipleRequest instance is external to the Plugin transaction, it manages to create the Exception record...