Building My Own App Without Code: Part One–The Setup



This week I went to Dublin, Ireland for the D365UG Summit EMEA. This is a conference held by D365UG aimed at users and partners working with the Dynamics products. As well as many passionate experts speaking all things Dynamics, there was a large group of users coming to learn what they can to maximise the use of their products. Usually Dynamics conferences are all about partners and Microsoft so this one is quite different.

Talks varied in their technical content from someone analysing Earth tremors through PowerBI, through to advanced development techniques. As well as presenting, I had time to sit in on some of these other sessions and came to realise that an old dream of mine could become a reality.

For a number of years I have wanted to build a cocktail management system in Dynamics. While the design is relatively straightforward, the problems were more logistical. For example, how do I afford the Dynamics instance it runs on? If I want to share my creation with the world, how do I do it?

Thanks to the presentations at Summit EMEA, I now think it may well be possible to create your own model-driven app in Dynamics and publish it with little to no code.

The App Itself

The app is pretty straightforward


Building this structure in Dynamics should be straightforward and then it will be a case of using the tools of Dynamics to allow for things like working out which cocktails can be made with ingredients on hand etc.

The Process

The process will go something like this:

  • Provision a CDS 2.0 environment to build the app in
  • Build the app in Dynamics/CDS 2.0
  • Package the app for submission to AppSource
  • Get approved
  • Drink Cocktails

I believe I now have the tools to do this at minimal cost and with minimal development skills. In the next part I will provision my environment.


Scheduling Workflows With Microsoft Flow


I recently attended the MVP Summit in Redmond and one of the highlights was a ‘Developers vs Value-Adders’ cage match. Essentially, a business problem was presented and the two sides gave a solution using code and configuration respectively. The referee (me) judged the best response for each problem.


One problem that came up, courtesy of Jonas ‘The Friendly Developer’ Rapp was a classic bugbear in Dynamics 365: the issue of scheduling workflows.


If you are unfamiliar with the bulk delete job engine trick aka the ‘Wittemann Manoeuvre’, this was a workaround pioneered by MVP veteran Matt ‘Freakin’ Wittemann so many years ago. In short, you used the Bulk Delete scheduler to run a workflow.

So, given Matt came up with this trick about five years ago, is there another codeless way to achieve the same end with the new tools available to us? The answer is Flow.

Scheduling Workflows with Flow: Simple Workflows

When we had the cage match, the specific example raised by Steve ‘Not the Bear from Brave’ Mordue was that of a sales team who needed the notes on a record cleared each week after the sales meeting. Flow lends itself nicely to this because we know we can update records in Dynamics through a Flow Action. So how would this look in Flow?


Here it is. First we start with a recurrence Trigger in Flow. This fires however frequently we like and retrieves a list of records using the Dynamics List Records Action. We then loop through the records and update each one with the Update a Record Action. Simple stuff. For the curious, here are the details. The recurrence step looks like this:


Here I just have it triggering every hour. It stats when the Flow is first activated. As you can see, you can set the start time to be whatever you like though. Next we have the List Records Action:


Here I am simply returning all the Contacts in the system. Finally we go through them and update:



So I am updating each Contact record and inserting the UTC date and time into the Description field.

Sure enough, the Flow runs every hour.


and the Contact records get updated.


Mission accomplished. So what if we want to do something more complex than simple record manipulation which is, essentially, all we can do with the Flow Dynamics Actions?

Scheduling Workflows with Flow: Complex Workflows

Flow does not have the richness of Dynamics functionality available to us via workflows so how about instead of trying to replicate the workflow, we simply use the scheduling engine of Flow but call the workflow to do the heavy lifting? The big problem here is there is no Action in Flow to call a workflow but that is ok, we can work around the problem.

The trick is to create a record using Flow and have a workflow trigger off of the creation of the record.


The only difference between this Flow and the previous one is that instead of updating the record, we create a new one. Here I have created a Task but this could be any record which is a child to a Contact. The nice thing about Tasks is they are child records to lots of things and it means we automatically have a record in the Activities of the Contact that a Flow has run against our record.



The Flow has now finished its part in the process and hands over control to the workflow.


The workflow waits for the creation of a Task. If the Task is calling the workflow then it fires and goes through its steps. In this case I update the regarding Contact’s Description field with another piece of text.


I also mark the Task as complete in my workflow but you could also flag it for deletion via the Bulk Deletion tool.


What would be great is if we could call a Flow directly from the workflow which then deletes the Task for us but this is not possible, yet. We could set a flag on the Task and use Flow’s ‘When a Record is Updated’ Trigger, but I digress.


If you are a developer or ‘value-adder’ and you are resisting jumping on board with Flow, you are missing out. While we could schedule workflows in the past through creative solutions like the Wittemann Manoeuvre or throwing code at the problem, Flow provides a straightforward, robust and manageable solution to the problem. To put it simply, Flow is an integral part of the future of the Dynamics platform and to resist it is to be left behind.

How the Internet of Things Made a Pancreas


Type 1 Diabetes (T1D), traditionally known as Juvenile Diabetes, is hard work. Often (although not always) it is young toddlers and children who get it. The cause is unknown. The consequence of getting it is your pancreas no longer manages your blood sugar levels properly and the pancreas’ job needs to be managed manually through diet, exercise and medications such as insulin.

For a parent of a child with T1D, this is a full time job. In the morning and at night, there are injections. Before every meal there are injections. There is constant monitoring of the child’s blood sugar levels with finger pricking, including every few hours during the night. If the child’s blood sugar goes too low they could slip into a coma and die.

Technology does help, albeit at a price. For the blood monitoring, there are Continuous Glucose Monitors (CGMs). These put a little needle under the skin and monitor blood sugar levels without the need for finger pricks. For insulin delivery, there are pumps which are attached and worn 24 hours a day delivering insulin.

Even with these tools the settings and monitoring are still manual. At meal times, the amount of insulin needed is estimated and the pump is manually adjusted. The parents still need to get up in the night and check the blood sugar levels.

Often the CGMs have an alarm if blood sugars are too low but they can be quiet, as Dana Lewis discovered. In Dana’s case she was the T1D and the alarm was supposed to wake her up if her blood sugar went too low in the night. It did not always succeed.

The Internet of Things Makes a Better CGM

Through Twitter, Dana discovered someone on the other side of the country (John Costik) had managed to get the data out of their child’s CGM and into an online spreadsheet so he could monitor his son’s blood sugar levels while at day care. Dana reached out to John and he gave her the code. She began building a better CGM. The plan was simple: pull the data out of the CGM, send it up to the cloud, send it back to her phone and, if her blood sugar went low, the much louder phone alarm would wake her. It worked.

Dana did not stop there. Dana lived alone and there was still the risk that, like many of us, she would sleep through the phone alarm. She reworked the system to send her data to her boyfriend and her mother. If she fell low and slept through the alarm, they too would be informed. It worked.

Collaborating with her boyfriend (Scott Leibrand), she made the alarms predictive. Rather than simply warn when she had gone too low, the alarm now warned her BEFORE she went too low so she could actively prevent it.

The Internet of Things Makes a Pancreas

Dana was still part of the system. The alarm from the CGM woke her up and she made adjustments to the pump to bring her sugar levels back in line. What if the adjustments could be made automatically? Again, someone else on the internet (Ben West) had figured out how to send commands to his pump using a radio transmitter and gave her the code. He too was a T1D looking to automate his pump. With Ben’s code, Dana removed herself from the system and it worked.

By the end of 2014, the system was fully working and it was clear this had the potential to improve the lives of many diabetics and their families. The sale of medical devices are, quite rightly, strictly controlled. Dana and Scott could not make and sell clones of their setup so they did the next best thing: they released the blueprints for free so others could build it for themselves and the OpenAPS (Open Artificial Pancreas System) was born.


Looping Today

The linking of a CGM and pump to automate insulin delivery is called ‘looping’ and there are three main projects on the internet for doing it:

  • Loop (A loop based on Apple technologies)
  • OpenAPS (Dana’s original project)
  • AndroidAPS (A fork of OpenAPS which uses Android technologies)

Looping has been around for 3-4 years and there are hundreds of diabetics using the system to manage their disease. Only now are the first commercial equivalents coming to market with the most basic of functionality. The expanse of time between when the technology arose to address the problem and when it was commercially released is the reason the movement to make an artificial pancreas has adopted the hashtag #WeAreNotWaiting.

When you know, every night, you or a loved one might not wake up and the technology is available to prevent that from happening, wouldn’t you do the same?

For me, the story of OpenAPS shows the best of what the Internet of Things has to offer. Sure, the CGM and the pump use the internet to talk, with no human intervention; a traditional Internet of Things but, to begin with the ‘things’ were ideas and incremental advances. When these came together and interacted via the internet something was achieved which could not have been created in isolation. Something that has the potential to improve the lives and prevent the deaths of thousands of people around the world.

Salesforce: Is The Bear Going Into Hibernation?


It has been a long break but it is back to the blogs and to start off the new year, it is the Salesforce quarterly review. Salesforce hit their third quarter just before the break and here is the breakdown.

Salesforce on the Grapevine (Salesforce News)

Salesforce and Google: The New Celebrity Romance

A while ago, Salesforce and Microsoft were going steady but things went bad. Salesforce now has a new love in their life in the form of Google and their ‘strategic partnership’ together. When it was Microsoft, a ‘strategic partnership’ meant ‘grooming for acquisition’. Interesting times if this is Google’s intention. The news for now is Google is building integrations to Salesforce; the first of which is allowing Salesforce sales data to be analyzed with Google Analytics. This fills a nice BI gap for Salesforce. A romance to watch.

Benioff Compares Facebook to Tobacco

Marc Benioff, suggesting “technology has addictive qualities”, believes it should be legislated like cigarettes. For Australia that would mean a warning splash page showing the detrimental effects of Facebook arguments and unproven health remedies and a ban on using social media within pubs and restaurants. He might be onto something.

Salesforce to Buy Twitter?

As well as the rumor of Google buying Salesforce, there is also the rumor of Salesforce buying Twitter, although the evidence is thin at this stage. This could be Benioff biting his thumb at Microsoft’s acquisition of LinkedIn or it could be a stronger play into the social media market to enhance their CRM suite.

The Undulating Hills of the Stock Price


Again a favorable quarter for the share price, probably due to the improved profitability with revenue growth uncompromised.

Landmarks (Numbers) of Note


While it is hard to divine a pattern in the margin graph, it is true that in the last year, the curve has mostly improved and Salesforce is making a few percent in profit.


While the cost growth has waivered around, for two years the revenue growth has sat steady at around 25% year on year. As mentioned before, the game here is to keep the red line above the green one to improve profitability. As we can see, red is flat and green is heading downwards. This bodes well for Salesforce’s continued profitability. In fact, at the biggest gap between the lines in two years (5%), this is probably the best news in the financials.


Here is the interesting one and the reason for the title. While revenues are growing, transactions shrank, again. This time down from 5.7b transactions to 5.4b. If more customers are embracing Salesforce, as suggested by the revenue growth, why are transactions falling?

As I see it, there can be only two explanations: either the customer base is not increasing and revenue is being driven by price increases or people are getting the same services with less transactions somehow being committed on the servers.

False Trails in the Woods (GAAP vs Non-GAAP)


Just like last month, GAAP was mentioned twice and Non-GAAP six times so we drink four mason jars of moonshine this quarter. I maintain my prediction the gap will reduce as Salesforce becomes profitable.

Noises in the Dark (Buzzword Bingo)

First of all we have the unusual occurrence of a phrase getting more than ten mentions. In this case Marc and the gang said the phrase “our customers” exactly ten times. It is an admirable focus. How about the single words?

2017 Q3

2017 Q4

2018 Q1

2018 Q2

2018 Q3

Number of Words














































No changes in the key words thrown out in the quarterly transcript proving that nothing new is really said each quarter; just a recrafting of the same messages. The only discernible pattern is all words have gone down in total mentions since 2018 Q1.

Getting the Lay of the Land (Predicting the Future)

Last quarter I predicted a profit of $30-40m (they made a little over $50m so well done Salesforce for exceeding my expectations). For revenue I predicted $2.7b which hit the mark.

For next quarter, I predict revenues just shy of $2.9b and for profitability, I am going to go out on a limb and predict Salesforce to break through the $100m mark.


In terms of acquisitions, it is obviously interesting times. Google and Salesforce together would be a formidable competitor to Microsoft. This being said, while I consider Salesforce and Dynamics 365 as on par with each other, I am still a fan of Microsoft Office over the Google office apps. Then there is the question of Salesforce’s lack of an ERP offering to counter Dynamics 365.

Financially, things are not too bad at all. Salesforce has a profit and growth remains steady. The fly in the ointment is the diminishing transactions which appears to be a trend and not an aberration. It is like a company which sells cars getting more profitable but having no cars on the lot; there is something strange afoot.

Gartner Trajectories For Sales Force Automation 2015-2017


A few months ago I showed the Forrester Trajectories for Sales Force Automation. What really stood out in Forrester’s latest report was it put Microsoft ahead of Salesforce and suggested, based on the trajectories, that Microsoft was improving while Salesforce was declining.

Gartner released their equivalent report about a month after my analysis and were not as generous, maintaining Salesforce at the top of the heap. Nonetheless I thought it would be interesting to see if the predicted trajectories of the two analysis houses comply or are also differing.

The Trajectories for 2017


Obviously the original reports had a few more contenders than those shown. My rule for selection is simple: if the product has appeared in all three reports, it is included in my analysis. Also, the lines move from the green dot to the red one. So, for example, we see Oracle has jumped in the latest report from being in the Visionaries quadrant to be in the Leaders quadrant.

As for the years used, we are using the Gartner reports of 2015, 2016, and 2017.

In comparison to the Forrester report, we have all of Forrester’s, except bpm’online which did not make the cut.

Niche Players (NetSuite, Infor, Zoho, Aptean)

In the bottom right we have the Niche Players. Generally these products do not have the full offering of the larger players or are relatively new entrants.

Netsuite, as was the case in the Forrester report, has fallen back, going from a Challenger down to a Niche player. The report says the customers were a big part of the drop in standing, suggesting the product lacks in forecasting, content management and lead management. Also, the customers complained of the product interface looking dated and features they requested were not added to the product. There is probably a cautionary tale here for Microsoft. While Microsoft has a place for people to raise requests for features in their products, I have not historically seen this heavily influence the direction of innovation with Dynamics 365.

Infor and Zoho are in a similar boat to each other in this report, staying within the Niche Player quadrant for the last three years. Infor has steadily improved its position within the quadrant over the period though and the report talks of a recent US$2b investment to accelerate its development plans. Therefore, it may be one to watch in the future. Interestingly, this strongly differs to the Forrester analysis which had Infor dropping in standing.

Zoho has done very little in the time period, circling around the same position. Arguably, Zoho has found its place in the market as a small B2B CRM offering and, assuming it has no ambition to be different to this, I imagine it will continue in this position. The Gartner report did warn of Zoho’s lack of customer service so while the product is good value for the price, the opportunity cost may be significant if users need a lot of support from the supplier.

Aptean’s main product is Pivotal. I have seen Pivotal in my career, and was encouraged to jump on board with it many years ago when I worked for a company called Praxa, owned by CDC Software. It is not a bad product but lacked the push behind it of the major players. The development environment was, arguably, much more flexible than Dynamics 365’s. They way it was often characterised to me was Pivotal was built, from the ground up, in .Net and many of the inherent features of the development platform were built into the product. So, for example, while managing configuration and customisation for Dynamics 365 cannot be readily done in Visual Studio/TFS, this is not, from memory, the case for Pivotal. 

Over the three years, Aptean has improved its position in the Magic Quadrant and is close to moving to the Challenger quadrant. Another one I would keep an eye one.

Challengers (SAP CRM)

SAP is the only vendor in the Challenger quadrant but it is not faring well and ended up just north of the niche player border. Reading between the lines of the Gartner report, SAP CRM is not a focus for SAP (arguably as Dynamics 365 on-premise is not a strong focus for Microsoft) and customers should be looking to the Hybris Sales Cloud offering instead. While Forrester did not cover the Hybris product, it also characterises SAP CRM and in decline although, arguably, not as strongly as Gartner does.

Visionaries (Base, CRMNEXT, SugarCRM, SAP (Hybris Sales Cloud))

Base and CRMNEXT have both migrated from the Niche Players quadrant to the Visionaries with CRMNEXT making huge progress over the three years. In the case of Base, a big part of their success appears to be due to a strong focus on onboarding new customers and their use of big data and predictive analytics to drive future sales.

For CRMNEXT, it has focussed on the finance industry and been very successful at addressing the needs of this vertical in Asia and the Middle East with many very large implementations. It has yet to crack the USA but, if it starts making headway there, it could become a powerhouse. Another one to watch.

SugarCRM and Hybris have bounced around the Visionaries quadrant over the three years and have been placed close to each over over that period. For SugarCRM, this is in alignment with Forrester’s perception. The report is mixed on SugarCRM, praising its innovation but also criticizing the gaps in the offering. The company behind SugarCRM has, in the last few years, moved away from the open source community, no longer releasing an open source community edition. I imagine a lot of the innovation for the product came from this online community so distancing themselves from them will not do them any favours in terms of innovation and development. I do not see SugarCRM making it into the Leaders quadrant any time soon.

Hybris Sales Cloud, SAP’s SaaS CRM play, is interesting. Arguably not yet as successful as Oracle in making the transition to online, they are maintaining their ground. The report suggests that functionality and integration to other products is improving but support and implementation issues are holding them back. If SAP can fix these issues, they will regain their former glory in the top quadrant but for now, I cannot see them getting out of the Visionaries quadrant.

Leaders (Oracle, Microsoft, Salesforce)

Finally, the products we really care about; the leaders of the pack. Historically I have characterised CRM as a two-horse race between Microsoft and Salesforce but Oracle is on its way back, having transitioned to the cloud.

For Oracle, the report praises their depth of offering, suggesting it is better than both Microsoft and Salesforce. In terms of what is holding Oracle back, the report suggests Oracle focusses more on the sale than the customer, sacrificing the customer onboarding experience and customer support. If they can get these two right, Oracle will again be at the top of their game. However, entrenched as their sales culture is, this is a big ask.

While Forrester characterised Microsoft as being on the way up and Salesforce declining slightly, this is not the case with Gartner where the two products maintain their positions relative to each other with Microsoft making slight gains in their completeness of vision.

In terms of what Gartner sees as significant in the product, Microsoft’s customization capabilities are called out. I am very happy about this. I often hear that, when competing against Microsoft, Salesforce sales teams will claim Dynamics is inflexible in its configuration and customisation, which is simply untrue. It is good Gartner calls out Dynamic’s configuration/customization as the strength it is.

In terms of where Gartner suggests Microsoft could improve, reporting was an area highlighted for focus. In short, Microsoft has great reporting technologies but they are not readily accessible by a Power User and still require a developer to access their full potential. In my opinion, a revamping of the outdated Report Wizard would go a long way in addressing Gartner’s concerns.

System performance was also called out as an issue by Gartner. Microsoft has, for a number of years, been plagued by slow form load times. Again, Salesforce used this against Microsoft when vying for work, spinning up a trial and showing the page loads side by side. I know Microsoft is addressing this in their transition to the Unified Interface and this focus should yield dividends in the near future with the current version (v9). I remain optimistic.

For Salesforce, Gartner praises the new Einstein offering for predictive analytics and the overall sales management system. Like Oracle, where the Salesforce was born from, Gartner criticizes Salesforce’s aggressive sales practices and heavy-handed contract negotiation. The biggest criticism though came from customers complaining they struggle to derive value from the product. Gartner literally says “Salesforce clients regularly identify issues with deriving value from their Salesforce implementations”. This is great news for those of us competing against Salesforce because a big part of the Salesforce counterplay to the fact that Dynamics is so much cheaper than Salesforce is the “value” argument. Gartner confirms this argument does not hold up in the real world. If you are involved in competing with Salesforce for sales and take nothing else from this blog post, take that quote from Gartner and have it as a full page in your presentation. I guarantee you that Salesforce will hate you for it.


In the end a much longer post than my Forrester one but, for me, at least equally interesting. In terms of the products to watch, my money is on Infor, Aptean’s Pivotal (not the first time I have called them out) and CRMNEXT. I predict Oracle will continue to improve their position in the Leaders quadrant but I am not so sure SAP will follow suit. In terms of the eternal struggle between Microsoft and Salesforce, it looks like not a lot will change in the near future. Whether Gartner or Forrester are correct in terms of the fates of the various products, this is yet to be seen.

Dynamics 365 Software Deployment and Flow: The Good, the Bad and the Ugly


Of the developers I talk to, there are mixed feelings towards Microsoft Flow. There are a few reasons for this such as:

  • It is quite new and a little buggy in places
  • They do not get full control to bend it to their will (the reason they are a little less hostile towards Flow’s big brother, Logic Apps, where they can access the underlying code)
  • It provides Power Users with a lot of power but does not strongly enforce discipline/good development practices (this is improving with the new policy framework available for the Premium edition)
  • There is little guidance on managing Flow as part of software deployment

All of the above are true and developers have reason to be wary. However, the same concerns were raised when Dynamics CRM got Workflows and we learned to work with them (although there is still room for improvement in most implementations in regards to refactoring and taking advantage of Workflow properties such as scope.

In this blog I will go through what I have discovered for managing Flows as part of a Dynamics 365 implementation.

What Do I Mean By Software Deployment?

I have also seen this called the ‘Software Development Life Cycle (SDLC)’ but, basically, I am talking about the idea that you do not develop in a production environment but still need a simple way to move a developed solution to production with a minimum of fuss and human intervention.

A simple architecture involves a set of environments with the developed solution progressing through them to production.


Method 1 (The Good): Two Environments (Premium Option)

With a Premium Flow plan you get two Flow environments and the ability to export a Flow as a ZIP file for importing elsewhere. While more than two environments would be nice, it is a good start. Let us call our two environments DEV and PROD.

In this scenario, a new Flow is developed in DEV and then exported to a ZIP file via the Export option for the Flow.


When we do, we get a number of options for our ZIP package.


For the Flow itself, we have the option of having it update an existing Flow (as shown above) or we can make it create a new Flow for us in the target environment. While it looks like there are options for the Connections as well, the only option available to us is to select the Connection on import. We can also add in comments to guide the user during import.

So we can imagine we have our DEV environment with DEV Connections and PROD with PROD Connections. This is good as it means it is unlikely a user will connect, say, a Flow being developed to a production Connection accidentally.

To import, we go to My Flows and the Import button is at the top on the right hand side of the page. When we import the ZIP package we see the following.


As can be seen, any comments we added are available and it is now a case of clicking on the blue text for the Connections, linking them up to the Connections in the target environment and we are good to go. We can also create new Connections, if required.

For the Update option, the user can change this to create a new Flow, if they choose to.

Once the Connections have been selected, the Import button becomes blue and you are good to go.

Method 2 (The Bad): One Environment (Non-Premium Option)

Almost certainly by design, Microsoft have made it that if you are serious about managing Flow as part of a software deployment, you will need a Premium account.


So, given we cannot export a Flow out of our environment, the option of moving it is not available. Also, we only have the one environment to work in; no more DEV and PROD. Therefore everything has to sit in the one place.


Unfortunately, this is a disaster waiting to happen. We need to manually turn Flows on and off and the Connections to all environments are available for manual selection. It would be very easy to make a mistake in this setup and cause significant problems for production.

Method 3 (The Ugly): Using Flow Management

The last method I tried was my most ambitious. Flow now has a Connector to manage Flows. You can literally create, delete and modify a Flow with a Flow. This holds a lot of potential from a software deployment perspective because it means, for example, we could set up a Flow which deploys our developed Flow from DEV to PROD at the press of a button; deployment nirvana.

As Dynamics 365 CE (the new name for Dynamics CRM) already has a deployment packager (Solution files), I wondered if we could use Flow Management to push a Flow into a Solution and then piggy back on the CRM deployment process.

This proved to be frustrating and ultimately failed but I still hold hope for this technique. Here is what I discovered.

I Could Not Select a Flow from Flow Management

While we can add a text input to a Flow’s manual trigger, there is not yet a way to search and retrieve a Flow by its Display Name. You literally have to specify the Flow’s ID to retrieve it, which is essentially impossible for the user to know.


Without this ability to find a Flow based on a property other than its ID, it makes it hard to create a generic deployment tool for Flows and we literally have to create a deployment Flow for every Flow we plan to deploy, hardcoding the Flow ID into the deployment Flow definition.

I Could Not Put the Flow Definition in a Text Field

This appears to be a fundamental bug in flow at the time of writing. While the slug for the Flow’s definition is available and the documentation specifies it is text, if you try and put that definition in a text field as part of your deployment Flow you get an error:

” ‘The template language expression ‘body(‘Get_Flow_as_Admin’)[‘properties’][‘definition’]’ cannot be evaluated because property ‘definition’ doesn’t exist, available properties are ‘apiId, displayName, userType, triggerSchema, state, connectionReferences, createdTime, lastModifiedTime, environment, definitionSummary, creator, provisioningMethod’. Please see for usage details.’.”

Translating with the help of CRM development guru George Doubinski, the slug is looking for ‘definition’ but the only thing available which comes close is ‘definitionSummary’. After hacking around in the Flow interface I managed to convince it to ask for the definitionSummary and got back what looked like a definition for the Flow.

I Could Not Put the Flow Definition into the Content Field of a Web Resource

My grand plan was simple. Get the Flow into a Web Resource and then add this Web Resource into a CRM Solution file. Then it moves across, out of DEV, with the other CRM components. Perhaps I was selecting the wrong type of Web Resource but I struggled to get the Flow definition to appear in the Content field. In the end, for the sake of expediency, I pushed it into the Description field of the Web Resource instead.


I Could Not Use This Definition to ‘Rehydrate’ My Flow

While it was possible to read the text file into a Flow and set it as a definition of a new Flow via Flow Management, the Flow failed


In the end the issues were insurmountable and I have chalked it up to revisit in six months or so when Flow Management, and Flows in general, are a little more mature.


There is still some way to go for a practical solution for non-Premium accounts to manage Flows as part of a software deployment process but we have the start of a process for Premium accounts. By all means see if you can work around the issues I had in using Flow Management to move a Flow into a CRM Web Resource and let me know if you have more success.

Linking IFTTT With Flow


Often when people talk to me about my blog, it is my old posts on workflows which they remember with the greatest fondness. For example, I created an audit log for v4.0, auto-number solutions, and even a global search tool before it was a thing. Then dialogs came along (deprecated now so do not get too attached) and I showed how to create multi-select option sets, a timesheet entry system, and a text-based adventure game. I think Flow is going to be my new source of non-coding shenanigans.

My first piece of fun is linking Microsoft Flow with IFTTT to update a currency exchange rates in Dynamics 365.

What is IFTTT?

This is a bit of a circular definition because in my first part of introducing Microsoft Flow I likened Flow to IFTTT. Now I am doing the opposite. Essentially, both of them allow you to link different web services together to do interesting things. For example, my Flow introduction had an email create an attachment in the SharePoint document store of a Dynamics 365 Contact record.

The Design

The trick to linking IFTTT and Flow was finding a way for information to pass from one to the other. There are a number of services both attach to but, to keep things simple, I selected email.

Essentially, IFTTT reads the latest US to AUD exchange rate, puts this in an email and sends it to a predefined email address (in this case my Gmail address). Flow monitors my inbox and when it sees an email with the right format, it extracts the exchange rate and updates Dynamics 365.



Setting this up was very, very easy. I logged in to IFTTT with my Gmail email address, set the trigger to be ‘Stocks’, picking the exchange rate trigger option with the action being ‘Gmail’


Other than setting parameters, such as the currencies, the only other modification I had to do was to the ‘Ingredients’ (what we call Slugs in Dynamics 365) so that the subject line of the email was precisely formatted.


At midnight, IFTTT kicks in and sends an email to Gmail with the subject “FLOW <exchange rate>”. Here is what it looks like.


The Flow Bit

I have purposely kept things simple in Flow as I covered some of the finer points in my three-part introduction articles.


The trigger is ‘When a new email arrives’.


I have limited Flow to only worry about emails from and I also have the option of filtering by Subject string if I need it, although I have managed that later on the Flow.

Next I set two variables. The first is “SUBJECT” which is a string and is set to equal the Subject of the email. The second is “RATE” which is a float and will become the new exchange rate.

Then I check a condition. In this case I am simply looking for any email whose Subject begins with ‘FLOW’. It is not hard to see we could have different Flows using different keywords to determine whether they should fire or not.

If the condition fails, nothing happens. If it succeeds, we set the RATE variable to the exchange rate in the email. For anyone who has used Excel formulae, this is not too difficult to master.

The Expression to use is:

float(replace(variables(‘SUBJECT’),’FLOW ‘,’’))

This simply removes the “FLOW “ at the start of the email Subject and converts whatever is left to a value of type float.

Finally, we update the appropriate Currency record in Dynamics 365.


There are a couple of things to note here. Firstly, all the mandatory fields in CRM are mandatory here, even though we simply want to update one field. This means we need to type in values for Currency Name, Currency Precision, and Currency Symbol, and the Exchange Rate. Secondly, I have hard-coded the Guid (the Record Identifier) although this could be easily retrieved using the search trick from the third part of my Flow introduction.

The Result

The result is an exchange rate in Dynamics 365 which is updated every 24 hours at midnight.


Is Flow the Future of Development?

It is true that because we can do something does not mean we always should. Such is the case with Flow. Just because a citizen developer can develop some very interesting Flows, we still need appropriate governance and management and sometimes this will mean traditional development is the better option.

Taking the above as an example, if we implemented our IFTTT/Flow combo into a production system, we now need to maintain an IFTTT Applet, a Flow, an email address in Gmail and so on. We can imagine that doing this for a dozen such arrangements becomes unwieldy.

Using development, we can centralise the configuration in one text file (or custom entity record) and create a console app to retrieve the exchange rate. As an example, Matthew Foy walks us through how to do it here for an on-premise Dynamics CRM implementation.

Also, as with any developed functionality, security need to be considered. Could someone mess with my Dynamics 365 system by sending an email with a bogus exchange rate in it? Where is my data going and can it be intercepted? Again these issues may be easier to manage in a developed solution.


We have some amazing power in our hands with Flow and even more so when we combine it with IFTTT. The trick for many organisations will be finding the balance between the rapid development of functionality using tools such as the above, and ensuring the result is maintainable and secure. For me, I will continue to work with Flow, coming up with codeless solutions to common Dynamics 365 problems, and continue to blog about them to give people an idea of how far they can be taken.