Workflow Elements tool created by Aiden Kaskela saves lot of time building complex workflows. And recently it’s source code was released on GitHub. Latest solution packages are available under “Release” tab on GitHub.
One of the great feature I like about this tool is to Fetch the data using Fetch XML and post it on Send Email activity as an HTML Table. You can build complex Fetch XML, but if you run into issues where you are using linked entities and the data is not shown in the Email that is generated then keep reading.
My scenario: I wanted to send an email for a particular Account that can list all the associated contacts with their name, job title, business phone and account number (coming from associated Account).


The Fetch XML that was produced as a result of above was

Now, let’s setup the workflow. I named my workflow as “Email Contacts associated to an Account” and made it on-demand; so that I can execute it from any Account. I then added a step from Kaskela Workflow Elements named “Get Results” and set it’s properties. The only thing I changed from the properties was “Fetch XML”. I added the above formatted Fetch XML here.


Add “Send Email” step and configure the email to add “HTML Table” in the email.

After activating the workflow and running it on account “Alpine Ski House” we get following output.


Resolution
So what happened there. The reason being Fetch XML query we generated was missing an “alias” on the link-entity. Once we added the alias and updated the Fetch XML query on the workflow we got the proper output.


Hope this helps. Keeping PowerApp’ing.
For more content subscribe to my blogs and follow me on:
LinkedIn: https://www.linkedin.com/in/danishnaglekar/
Twitter: https://twitter.com/Danzmaverick
GitHub: https://github.com/Power-Maverick
YouTube: https://www.youtube.com/channel/UCaSGBbkXg_7lNHP8a5Mht9Q?sub_confirmation=1
1 comment