Microsoft Graph API – Assign DYN365 License to AAD User

December 27, 2018

The automated process of user provisioning becomes common in many projects. Often, the process includes components outside of Dynamics 365 such as  creating a user in Azure Active Directory, assigning plans and licenses and adding user to AAD groups. All of these can be automated using the Microsoft Graph API. In this post, I’ll demonstrate assigning Microsoft Dynamics 365 license to an existing user with Postman. You can later convert Postman requests to JS or C# code or use in Flow and Logic Apps. Prerequisites Have Postman application installed Have access to Office 365 and...
no comments

Auto Backup Dynamics 365 Solution using Flow & Dropbox

December 24, 2018

Harnessing the scaffold suggested in my last post, I would like to suggest a simple way to automatically backup Dynamics 365 solution with Flow/Logic Apps. The following Flow will allow you to copy Dynamics 365 solution file into Dropbox account on schedule for backup or any other purpose.You can download the scaffold Flow solution here and import into your Flow environment. Then, update the necessary details according to the following walkthrough. The last Dropbox related Action is not included, you’ll add it yourself. Prerequisites Access to Microsoft Dynamics 365 online instance and Flow environment Register...
no comments

Executing Web API Calls from Flow/Logic Apps

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.   ...
no comments

Execute a Recurring Job in Microsoft Dynamics 365 with Flow

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. In...

Custom Code Tracing & Exception Logging in Dynamics 365 v.9

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...
no comments

Drag & Drop File Upload Revisited

October 18, 2018

Finally found the time for overdue maintenance on the Drag & Drop solution I created two years ago. Why revisit? 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...
no comments

Microsoft Portal – Retrieve Dynamics 365 Data Asynchronously – Part 2

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...

Microsoft Portal – Retrieve Dynamics 365 Data Asynchronously – Part 1

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...

Animated Tip: Create a Fully Functional Portal Page in 60 Sec. (Or Less)

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...
no comments

Execute a Recurring Job in Microsoft Dynamics 365 with Azure Scheduler

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...
no comments