Advancing Productivity and Operational Efficiency through Cloud Services and Apps



Process loops with Dynamics CRM Online and Microsoft Flow

In this post, we’ll take a quick look at how to perform a loop, or “for each” statement, using Microsoft Flow. The scenario will be as follows: An Account gets updated in Dynamics CRM online with a new owner, we need to kick off a process that sends an email to every contact in the account with information regarding the new Account Owner. While we could easily accomplish this using a standard workflow in Dynamics CRM, the scenario lends itself well to test the loop and filter functionality in Flow.

Before getting started with Flow we’ll need a way to tell that the owner has changed when a record is updated. While this is outside of the scope of this post and well documented in various discussion forums, I’ll provide a brief overview of how I accomplish this: I’ve created a field on the Account entity called “Previous Owner” and have updated the field on every Account record to match the value of current owner. The process we create in Flow will match the fields back up once it is done processing.

  1. First we need to create a new field to track the previous owner
  2. I’ll login to Flow ( and click on “My flows”
  3. I’ll click on the “Create from blank” button to create a new Flow from scratch

  4. I’ll specify a trigger of “Dynamics CRM Online – When a record is created”

  5. I’ll select my Organizations name from the drop down list and choose “Accounts” for my entity name. This tells Flow that I want this process to run whenever an Account is updated in my Organization.

  6. Click on the “New step” button and select “Add a condition”

  7. Next, we’ll need to check if the Owner field was update. In the Condition block select “Owner” for the Object Name “is not equal to” for the Relationship and “Previous Owner” for the Value. Then click “Add an action” in the “If yes” block.

  8. We need to retrieve the contacts for the updated account. Select “Dynamics CRM Online – List Records” as your action. Select your CRM Organization and contacts as your entity name. Click on “Show advanced options” to create a filter for the query to return only contacts of the updated account with email addresses.

  9. In the textbox labeled “Filter Query” enter “_parentcustomerid_value eq #account# and emailaddress1 ne null” where account is selected from the Outputs of the previous step.

    For specific details on how to write these queries, check out the following MSDN article For details on the Web API Entity Reference (what fields/field types can I expect for each entity when querying with the API) check out the following MSDN article (

  10. All that is left at this point is to send an email “for each” contact (performing our loop). We’ll click on the “New step” button following the “If yes” block and select “Add an action”
  11. Select “Office 365 Outlook – Send an email” as your action. If you haven’t configured your connection to Office 365 Outlook, you’ll need to do so at this point.
  12. Select “Email” in “Outputs from List records” as your “To” value. Notice that Flow picks up that the email is coming from a list of records and it will automatically create a “for each” container for you.

  13. Enter a “Subject” and “Body” for the email (you can use values from fields in both the updated Account record and the Contacts List record.)

  14. Add a new step to sync the Owner and Previous Owner fields of the Account.

  15. Give your “Flow” a name and click the “Create Flow” button at the bottom of the screen.

Test your flow by changing the owner of an Account in Dynamics CRM. In the Microsoft Flow portal, you can check the status of your Flow by clicking on the information icon next to it.

You’ll see a list of successful runs and failures (if any) for your Flow.

Clicking on the arrow next to any of the runs, will show you a diagram of the completed flow.

The following diagram is from a failure. Here, the failure is caused after the flow is triggered a second time by syncing the Owner and Previous Owner fields… It results in an Account update; which is the trigger for our flow, followed by a condition failure (the owner and previous owner now match.) In theory, our conditional block should have prevented this error by going down the “if no” path.

While I’m tempted to chalk it up to Flow still being in preview, I’ll admit I’m no expert, at least not yet 😉 and will do a little more digging around to see if I can clear this up. In any case, it serves as a good example of what a failure looks like.

How Software as a Service is transforming BPM and Line-of-Business Systems Integration

It’s not too long ago that most companies had no systems, and everything was a manual process. People, binders, and papers were the system. Long running processes, errors in data capture, and lack of visibility where the norm. A resource’s area of expertise was to a large degree the silo then, and as long as they spoke the same language the challenges of “integration” mostly involved data capture through paper and pen. Then came the Digital Revolution, the beginning of the Information Age, and solutions began to emerge targeting all sort of repeatable processes that could be easily automated. Economies of scale broadened the reach and accessibility of these focused solutions or offerings, and economies of scope bundled them together into the silos we’ve been working with over the last couple of decades.

Take just about any company’s IT operation today, and you’ll find a series of silos across their critical systems: HR, Finance, Customer Management, Supply Chain, Opps… But companies don’t operate on silos, and many (if not most) critical business processes rely on data and interactions that span across several of these systems; and so we fall back on manual processes,  and/or custom scripts and modules, written in various programming languages to provide some level of integration. The manual processes; error prone, with little insights to improve upon. The scripts and custom modules; with few people (if anyone) able to update them, and just enough familiarity to keep them running.

Now as companies begin to move their systems to the cloud, and the ability to integrate these systems starts shifting to the service providers; what was once a burden to IT begins to take shape into an opportunity. For service/solution providers, an opportunity to stand out from the competition by offering more and better integration options; for businesses consuming those services, an opportunity to offload some of the burdens, and improve upon existing processes that lack and so desperately need more integration.

We can already see a lot of this taking shape. With Office 365, the burden of integrating Exchange, SharePoint, and Skype, has virtually been eliminated. Integrating these wasn’t always an easy matter; now with Office 365, giving our users the ability to attach a file from OneDrive to an email via OWA (Outlook Web Access) requires no configuration, Skype presence, and Office Web Applications just work. These benefits aren’t limited to the staple Office 365 products; they also extend to Project Online, and CRM Online which recently announced, Immersive Excel, OneNote Integration, and folder based email tracking.

But it’s unrealistic to assume that any company’s critical systems and services will all be hosted by a single provider. And even for the services that are, integration can still be a challenge. This becomes quickly apparent when looking to build apps or automate processes that are closer to the core of your business; those unique enough that they cannot be built for the masses; and every business has them.

Enter the world of solutions that offer BPM (Business Process Management) with forms, line-of-business (LOB) systems integration, and workflows. This isn’t a particularly new breed of solutions, with many of the vendors having been around for many years. But it is evolving, and at a very rapid pace. LOB systems integration has always been at the core of the best of these offerings; unfortunately, inconsistent implementations of the various systems along with several other factors were always a challenge.  Now, the move to cloud and Software as a Service offer a level of consistency that’s completely changing the landscape. There aren’t many varying factors (if any) across one customers implementation of SharePoint Online from another’s; except how they use it and organize information. The same goes for Exchange Online, CRM, Salesforce, Box, DropBox. For BPM solution providers, this presents an opportunity to develop and offer levels of integration that simply weren’t possible or cost effective before. If it works for one customer, chances are it’ll work for them all.

But not all BPM solution providers are leveraging this opportunity, and some continue to rely heavily on requiring customers to configure web services and leverage assemblies for integration. Which means that if a customer wants to integrate with another system or service, they often must research, go through complex web service configurations, and sometimes develop the various integration points themselves. When evaluating solutions that offer BPM, Forms, and Workflow; look for vendors that are investing in building connectors, and offer a strong community of partners and developers that are extending them. These should not only reduce the effort involved in connecting to other systems, but also provide consistent experiences and reduction in errors; both of which should be core principles of any company offering solutions for BPM, Forms, and Workflows.

Formularios móviles con capacidad “offline” (sin conexión) para SharePoint utilizando K2

Con la introducción de SharePoint 2013 y OneDrive para la Empresa hace un par de años, Microsoft introdujo mejoras significativas a la facilidad de uso en cuanto a archivos sin conexión, y la sincronización de estos archivos. Pero con estas mejoras y la eliminación de SharePoint Workspace vinieron ciertos sacrificios: el manejo de metadatos de archivos (que no sean de Microsoft Office) sin conexión ya no es posible, y también perdimos la habilidad de editar y luego sincronizar listas.

Claro, con la ayuda de InfoPath y alguna creatividad utilizando las capacidades rudimentarias de flujos de trabajo en SharePoint, aun podíamos capturar datos utilizando formularios InfoPath. Y luego sincronizar esos datos con nuestras listas utilizando flujos. Pero desde hace algún tiempo, Microsoft anunció la inminente eliminación de InfoPath, y los muy esperados Formularios de Listas para SharePoint (FoSL) han sido cancelados.

Aunque parece que Microsoft continuara el soporte para formularios de InfoPath en esta siguiente versión de SharePoint ¿Sigue siendo InfoPath la mejor opción, o incluso una buena opción? Especialmente para el desarrollo de nuevas soluciones. ¿Y qué tal su estrategia móvil? ¿Incluye soporte para dispositivos electrónicos con iOS o Android?

En el siguiente video demuestro lo fácil que es desarrollar formularios móviles con capacidad “offline” utilizando K2 smartforms para listas de SharePoint. Y como utilizar la aplicación “K2 Móvil” en iOS o Android para capturar y mostrar datos utilizando esos mismos formularios.

Formularios móviles para SharePoint utilizando K2 smartforms from Rafael Perez on Vimeo.

Announcing Exchange Active Sync Support for Hotmail E-Mail, Calendars, and Contacts

The Windows Live Blog just announced exchange support for Hotmail E-mail, Calendars, and Contacts. Check out the announcement at

Office 2010 Web Apps on Facebook

By now you’ve probably heard the news that the Office 2010 Web Apps are available for all Windows Live Customers, essentially anybody with a Windows Live or Passport ID. If you haven’t heard, logon at  and check out the “Office Link” in the top menu or go directly to
Click here for the original announcement.

What you probably haven’t heard, is that the Office 2010 Web Apps are also available in Facebook via the “Docs” application; from where you can easily create, upload, and share your MS Office documents (Word, Excel, PowerPoint) with your friends, or everyone for that matter.


You can even designate your friends as editors, and collaborate on documents, worksheets, or presentations. Once you are done, you can easily post it to your wall and share with everyone. All via your Web Browser.


I’ve uploaded several presentations to “My Facebook Docs” for you to check out (you must be logged in to Facebook).

Consumer Reports recommends against buying iPhone 4

Consumer Reports arrived at this conclusion after testing three devices purchased at three different retailers, and testing them in a controlled environment. Their findings call into question the recent claim by Apple that the iPhone 4’s signal-strength issues were largely an optical illusion caused by faulty software that “mistakenly displays 2 more bars than it should for a given signal strength.

Check out the posting at:

BCS External List Error – Unable to Display this Web Part; Target Application Not Found.

There is a good chance you’ll run into this error now and again when working with BCS Business Connectivity Services and External Lists:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID:{correlation GUID}

If after looking for the Correlation ID in your logs you find the following error:

The Microsoft Secure Store Service application Secure Store Service failed to retrieve credentials. The error returned was ‘Target application not found (application id: {SecuredStoreApplicationID}).’

It may be an indication that you’ve not established an association between the Secured Store Service Application and your Web Application.

To check your associations go to Central Administration > Application Management and click on “Manage Service Application Associations”


Look in the “Applications Proxies” Column for your Secured Store Service Application


Keep in mind that you may have configured more than one Secure Store Service Application, and even if one is listed, it may be the wrong one; in which case you’ll need to change the association. You can change the association by changing the default Application Proxy Group, (clicking on the “default” link,) but beware that this would change it for all of the default associations. Alternatively you could create custom associations for your Web Application. But the better alternative (if a “default” Secured Store has already been established) might just be to re-create the Target Application in the “default” Secured Store.

SharePoint 2010 BCS – SharePoint Tech Dive Today at CTREC Hilton

Join us this afternoon March 16th at 6:30 at the C-TREC HILTON IT Academy, where we’ll discuss Business Connectivity Services and the Secured Store Service in SharePoint 2010. Go to for more information.

Step by Step Video: SharePoint 2010 External Content Type (and List) with SPD and BCS

I just finished uploading a step by step video on how to create a SharePoint 2010 External Content Type (and list) using SharePoint Designer and Business Connectivity Services. The volume is a bit low, so you’ll likely need to raise it, although it sounded fine with headphones. If you find it too difficult to hear, let me know and I’ll re-record.

digg_url = “”;digg_title = “Step by Step Video: SharePoint 2010 External Content Type (and List) with SPD and BCS”;digg_bgcolor = “#FFFFFF”;digg_skin = “compact”;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;

Blog at

Up ↑

%d bloggers like this: