The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Full disclaimer… this post was triggered by what a fellow MVP, Olena Grischenko, wrote earlier today: https://msolenacrm.blog/2020/06/18/power-automate-for-cds-what-was-it-before-we-run-the-update-or-byebye-no-code/
I am all for plugins, I actually write them every day But, then, should not there be some way to work with pre/post images in PowerAutomate? Without code?
And there is one, although “no code” solutions are not, always, the easiest:
Basically, we can set up CDS to send pre/post/target data to a queue in Azure Service Bus. It’s not a complicated process, you just need to follow the steps described here:
Just make sure to use json message format when setting up the integration:
Once that is done, you can start adding SDK steps. And, for those SDK steps, you can start adding pre/post images:
Let’s say that’s been done.
The next step would be creating a flow. PowerAutomate has a connector for Azure Service Bus:
So, set up the trigger:
The remaining part is all about parsing that json from the message queue. Unfortunately, there is no “native” regex capability in Flows, though there are a few third-party connectors there. I did not try those, pretty sure they would work, but this is where “no code” is not the same as “no fees”
Instead, I just opted to tweak the regex custom connector which I blogged about some time ago:
Here is the code I used for the regex action this time:
Now, once there is a regex connector, I just need to add a couple of action to extract “name” field from the pre image:
And, also, to extract it from the post image:
This is where you may have to look at the json and figure out how to write that regex expression (might need to test it in the regex tester).
Once that is done, I can access both pre-image and post-image values of the “name” attribute. In my case, I simply sent an email to myself:
And, once the email came in, both value are there:
What are the caveats?
But, in either case, except for the regex connector, this is a no-code solution to the problem. Might actually be possible to just use a bunch of “substring” and “indexof” function calls to do the same, but it’s probably easier to just set up that custom regex connector (or to subscribe to one of those which are already available in Power Automate)
Business Applications communities