November 22, 2018
While writing my previous post regarding Flow as a scheduling mechanism, I stumbled across this post demonstrating how to execute Web API calls from Flow. Why would you want to execute Web API calls from Flow/Logic Apps?While Microsoft Flow/Logic Apps support basic Dynamics 365 operations, there are many missing functions that can simplify common integration scenarios between these platforms: executing Custom Actions, triggering Processes, handling metadata and issuing complex queries. Some of these problems can be worked around using the Command Pattern, but using the Web API from within Flow/Logic Apps provides a simple and powerful integration mechanism. ...
November 11, 2018
I have written about executing recurring jobs in Dynamics 365 few times in the past. Over time, I suggested different scheduling mechanisms such as Microsoft Dynamics Workflow Timeout step or Azure Scheduler, as the pattern I suggested allows changing the scheduling mechanism without impacting other solution parts.
Flow can be also used as a scheduling mechanism, one that does not require coding like Azure Function, as it has a built in integration with Microsoft Dynamics 365 Online.
Once invoked on schedule, the executing component query Dynamics 365 for target business records and apply some business logic (Process) to each business record.
October 28, 2018
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...
October 18, 2018
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...
October 15, 2018
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...
October 12, 2018
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...
February 22, 2018
The Create Portal Content wizard is a nice new feature in Portal version 8.3 that was published recently. This wizard simplifies the process of creating webpages along with entity forms and entity lists by admins.
If you are not familiar with the process of provisioning new pages in Microsoft Dynamics 365 Portal, you can do some reverse engineering of the Portal elements automatically created by the wizard.
In the following demo, I am creating a new Page for authenticated Portal users which displays Lead records with an option to create new record. It assumes that the user has the required Entity...
February 8, 2018
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...
January 30, 2018
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...
January 10, 2018
While reviewing existing Microsoft Dynamics 365 Online implementations, I have noticed a repeating assumption by which Custom Workflow Activity, executing within an a-synchronous process, is not subjected to the sandbox 2 minutes execution timeout limitation. This false assumption led to wrong architectural designs in which long running processes are assigned to be handled by CWA components. As this article states, Custom Workflow Activity code registered to work in sandbox mode is subjected to the 2 min. execution timeout limit, just like Plug-in code. If you want to test this declaration yourself, just put a Sleep statement in your...