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

Advanced Find

Query Result from Advanced Find

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

Fetch XML Query

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 Step & Configure Properties

Insert Fetch XML

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

Configure email to send HTML Table

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

Run On-Demand Workflow

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

Corrected Fetch XML

Correct 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

Processing…
Success! You're on the list.

1 comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: