Current Version: 3.1.0, released August 29, 2019
MAJOR NEWS!
There are two huge updates for Workflow Elements.
- Workflow Elements is now open source and is available from GitHub. You can access all the source code here: https://github.com/akaskela/WorkflowElements You can also download the solutions directly from the Release page https://github.com/akaskela/WorkflowElements/releases
- You can now install Workflow Elements for CDS. There is one solution for CDS which has all the activities that don’t rely on the traditional CRM entities, and another for CE which has all of the activities.
These are the two biggest requests I’ve had over the past two years and I’m happy to finally announce it.
WHAT DOES THIS MEAN?
A few pretty cool things:
-
If you were unable to use Workflow Elements because of security concerns, now you can inspect the code to verify what it does.
-
If your organization is using the Common Data Service without Dynamics 365, you’re now able to use the vast majority of workflow activities.
-
You can embed the code directly in your project, so you can augment your current solutions without having to make sure Workflow Elements is also installed.
All documentation can still be found on WorkflowElements.com while I migrate everything to GitHub.
Workflow Elements is a free solution for Dynamics 365 that gives you the tools to build workflow in ways you never thought possible. You can query for records (even filtering it to related records), insert tables into emails and tasks, format dates any way you want and more, all with a clean, easy to use interface.
In less than 5 minutes you can write a workflow that sends a fully customized itemized receipt to a customer with all of their product information. Normally you’d have to find a developer to write custom code for you, but not anymore. You can download from the App Source, or for CRM 2015 and earlier check out the download page for older versions.
I’m always looking for new ways people are using Workflow Elements so leave a comment or hit me up on Twitter (@AidenKaskela). If you experience any issues, check out the Reported Issues page to let me know so I can get it fixed.
Licensing: The Workflow Elements managed solutions are licensed under the MIT license, but if you’re interested in licensing an unmanaged solution and the source code, please email me at Aiden@KaskelaSolutions.com
What are workflow activities?
A workflow is a set of instructions that you combine to give CRM functionality to suit your business needs (Trigger: When an invoice is paid; Check: If the customer is an individual; Action: send an email confirmation). A workflow activity is one of the instructions, like a tool in the toolbox. Microsoft provides a lot of tools to let you do basic actions, but we need so much more. Fortunately, they’ve provided a way to expand on that with custom workflow activities.
A custom workflow activity can have input parameters and output parameters that you can interact with in your workflow. Having these simple mechanics available lets you build limitless custom activities. Whether it’s as simple as a math problem (you need to take in a number and return the square) or a complex integration, custom activities open up a whole world of customizations for the CRM user or Admin.
How are people using Workflow Elements?
Generate a full invoice and email a bill
One client of mine deals with support cases, and when a case is resolved he generates an invoice, queries for the amount of billable time spent on the case, add a product to the invoice for the billable time, generates a bill for the invoice from a Word Template, renames the document to include the invoice number, attaches the newly renamed document to an email, and sends it to the customer on the invoice. He was able to build a fully automated billing system with a handful of activities and no custom code.
Email record details when somebody updates a record
I have a client who has a lot of events and all of the setup data is housed in Dynamics 365, and when some of the records change they want a manager emailed with the old and the new values. They set up workflows to run on change, and used an activity to get audit details for the record, then sent out an email with the details. This always ensures a second set of eyes on any changes to critical data (which can happen pretty easily with auto-save).
Send an email as an itemized receipt
I have a the step by step details for how you can do this for yourself. The organization has a workflow that runs when an invoice is paid. They have a query run to retrieve the invoice details for that invoice, then embed the table into an email. 5 minutes to set up and a clean, professional looking email.
Use custom date formats in an email
When you’re emailing somebody and want to include a date from Dynamics, you don’t have any flexibility about how it’s displayed. In some cases you might want the date to read “Tuesday, July 4, 2017”, or “7/4/2017 12:30 pm”, and in others it could be “20170704 1230”. You can build up a custom date format and show a date time field however best fits your scenario.
And what are people saying?
We’ve just scratched the surface with this, but we’re already using it for weekly alerts to users for overdue follow-up, weekly activity emails to the sales managers, shipment notifications with line item detail from the invoices, sending quotes with the line item details to contacts and emails to our customers with all of the contacts in their organization so we make sure we keep the contact information clean and up-to-date.
– Joseph Markovich, Information Technology, Okaya Electric America
Thank you @AidenKaskela for discussing Workflow Elements! This tool will def make my life easier! #CRMUGReston
— Christie Cripe (@CRMChristie) May 18, 2017
Workflow Elements – Awesome solution, thanks Aiden Kaskela @AidenKaskela https://t.co/g8e9OSm1i4
— Nishant Rana (@nishantranaCRM) May 7, 2017
@AidenKaskela Was troubleshooting a problem with my company’s CRM system & your solution worked like a charm. Thanks!
— Gary Zilavy (@gzil) April 14, 2017
This is awesome!!! Thanks for sharing.
— CRM Chart Guy (@crmchartguy) September 1, 2016
this is a great project Aiden, well done!
— Andrew Bibby (@AndrewBibby) August 31, 2016
My current fav’ free @MSFTDynamics workflow solution from @AidenKaskela – Use workflows like never before https://t.co/e6pDczVbrJ #msdyncrm
— ‘That Guy’ Mark O (@thatguymarko) August 30, 2016
Workflow Elements – really neat package of CWAs for #MSDynCRM https://t.co/hKqprJ9hlj by @AidenKaskela pic.twitter.com/FIG05EZBfB
— Jonas Rapp (@rappen) August 24, 2016
Great job! I can’t wait to see what’s possible with these new capabilities. Thanks for sharing with the #MSDYNCRM community!
— Gus Gonzalez (@GusGonzalez2) August 23, 2016
Pingback: Microsoft Dynamics CRM | Field Service–Customer Reports - Microsoft Dynamics CRM Community
It would be great to use the Query feature to prepare a list of people (through some complex parameters, fetchxml) and put that list as Recepients
LikeLike
This was added in 0.9.2, it’s “Emails – Add Recipients from Query”. Enjoy!
LikeLiked by 1 person
Related to the above, my biggest headache with workflows is when an entity has many related records e.g. A quote and quote products. You want to update a quote product while running a workflow from the quote and apply a change to a related quote product (or all related quote products) based upon a criteria. Ability to start a child workflow where the input parameter of the child workflow is the quote id where you are running the first workflow from would help. So in that way on child workflow first check criteria could be where parent quote I’d = quote id from parent workflow. This is pretty much impossible for me out of the box. Or did I miss something?
LikeLike
This was added in 0.9.2, it’s “Workflow – Run on Query Results”. Enjoy!
LikeLiked by 1 person
Have a look at North52 formulas. I haven’t come across a problem that I haven’t been able to solve using it. At my current client we are using it to write some seriously complex business logic, including integration to SAP. the logic is written using an easy to understand language and has a ton of functions including fetchxml support
LikeLike
I’ve seen North52 before and it’s pretty impressive what they’ve built (and they charge accordingly). I’m not trying to build a workflow package to do everything for everyone; I want to build a simple solution to let the average non-technical user do some really cool things that should be available out of the box.
LikeLike
I like this workflow solution as it gives you more control and it’s a simpler setup. With North52 solution what happens is that they add so many plugins and steps as part of scheduled formula that it affects overall system performance.
LikeLiked by 2 people
Hi Aiden-
This solution is absolutely amazing. Thank you for taking the time to write this AND take requests for additions! We’ve just scratched the surface with this, but we’re already using it for weekly alerts to users for overdue follow-up, weekly activity emails to the sales managers, shipment notifications with line item detail from the invoices, sending quotes with the line item details to contacts and emails to our customers with all of the contacts in their organization so we make sure we keep the contact information clean and up-to-date.
THANK YOU!
-Joe
LikeLiked by 1 person
Hi Aiden,
I’ve attempted to use the “Get a Table (Default Styles)” to send an email with the invoice products related to a the parent Invoice but instead I get an email with all Invoice Products in my system. Would you happen to know where I might have went wrong in my setup?
LikeLike
Hi Reggie,
It sounds like you’re missing a link in your advanced find. Link from the invoice product to invoice, and add a filter Invoice Contains Data. Check out this post for that example https://kaskela.wordpress.com/how-to-limit-query-result-to-related-records/
Let me know if that works.
Thanks,
Aiden
LikeLike
Aiden,
It works perfectly, what a wonderful solution. Thank you!
LikeLiked by 1 person
Hi Aiden,
First of all I would like to thank you for creating this wonderful solution!! I tried using “Add product to Order” and product description is not available when using the “Write-in Product Name”. Is it possible to be added to the workflow?
Thanks
Mario
LikeLike
This was added in 1.0.1. Unfortunately it’s only available for CRM 2016 and Dynamics 365.
LikeLike
Hi Aiden,
Question about “Run on Query Results”. Can this be used to run workflows on sibling records?
For example, I have a membership record of a certain type and I want to know whether contact has another membership record of a specific type. If that record is found, run workflow on it, if it is not found then run a workflow to create it.
Thanks again!
LikeLike
Hi Reggie,
The view would be something like: “Membership (of Type other), with a Contact, with a Membership (of Type this one), where Membership of type this one contains data.” That should give you just the other memberships.
Run the query to check the number of results. If there is one, call “Query – Run Workflow on Results” with the same view and the workflow. If there isn’t one, create the record.
Enjoy!
LikeLike
Hello Aiden, this sounds amazing. I will try this soon. One requirement that I have run into is to query for a single record based on certain filter criteria (say Name) from an entity that is not related to the record that triggered the workflow. For example, say, you have a Custom Settings entity where you store certain global parameters (say Approval Limit) and you want to query the record and use the result in the workflow. Is this possible to add? Thanks.
LikeLike
Hi. Thanks for the comment. You can do that now using the activity – just build your view the way you normally would in an advanced find and make sure the value you want is the first column in the results. You’ll be able to get the field value in one of the “Single Value” return results.
LikeLike
That’s great – thanks! Would it be possible to update this unrelated record within the workflow?
LikeLike
Hi. You sure can do it, in a round-about way. If your related record was “Custom Setting” and you want to set a field, you’d have to have a workflow on ‘Custom Setting’ that has the update logic, and mark it as a child workflow. In the main workflow, call the activity ‘Workflow – Run on Query Results’ with the query for the custom settings. You won’t be able to pass any values into the child workflow unfortunately, but you may be able to retrieve any values you need by writing a query on the child.
LikeLike
Pingback: Workflow Elements - Marcello Tonarelli Blog - Dynamics CRM Users - DUG
I’ve just downloaded this and its brilliant! I needed to add a Order Line to every Order and this has made it possible. Is there any plans to add the ability to add additional fields to the “Sales – Add line item” workflow? I have some custome fields that I’d like to be able to add this way.
LikeLiked by 1 person
Hi Gary,
Thanks! I tried a few tricks to allow that but didn’t have any success – what I wanted to do was return the line item as an output parameter so you could set whatever fields you want. The code was valid, but the workflow itself would ignore the order detail as a return parameter.
One hackey way to do it is to have a field on your sales order that mirrors the field you want to set on the order details, so you have order detail “Other Description” and on the order, “Detail’s Order Description”. In your workflow, set the order’s field and then create the order detail. You’d add a workflow on the order detail so on create of the detail, update the detail’s Other Description with the field from the Order. If you had multiple line items, you’d update the order field before you create each item. It’s definitely hackey but should do the job.
Good Luck! Aiden
LikeLike
Hi Aiden
Thanks for the quick response, i’ve been reading it over and over trying to get my head round how to make it work. I’m really not sure what you mean, probably the mix of not enough CRM skill and its been a long day.
Gary
LikeLike
Hi Gary,
I didn’t write that very well, so I think I deserve most of the blame 🙂 The idea I was going for is that you can’t push a value from the Order to the Order Detail, but if you’re on the Order Detail then you can pull a value from the Order.
Add a new field to the Order that the Order Detail will pull from. Then, set up a workflow that runs on the Order Detail when it’s created, which sets your field on the detail, setting it to the new field on the Order. In your main Order workflow, instead of trying to set a field on the detail you just need to set the field on the Order, and create the Order Detail (and that workflow will set the field to whatever you set on the order).
Hope this helps clear things up. If not, I’ll shoot you an email and we can get into more detail.
Thanks,
Aiden
LikeLike
Nice feature set. one thing I would like from the query is the Count of records it returned.
LikeLike
Hi Nelson,
Thanks for the kind words. You can get the size of the result set from the output parameter ‘# of Results’.
Thanks,
Aiden
LikeLike
Yep. Found it 5 minutes after I made the request. You are good!
LikeLiked by 1 person
It’s a great tool. You are the best! Can we do something for auto-numbering custom entity?
LikeLike
Hi Ilnur,
Thanks for the awesome feedback. I won’t be adding anything for autonumber because there are a few good(ish) solutions for autonumbering for 8.2 and back, but starting with v9.0 autonumber attributes are possible out of the box.
Thanks,
Aiden
LikeLike
I used the Query Get Results to find a record and I like that I can use Single Value in the workflow conditions, but if I want to use the results of the Query to populate a lookup field in a workflow Update Record step, there are no options in the form assistant, it seems I can only update text fields. Could you add a EntityReference as an option to the Query?
LikeLike
Hi Nelson,
I’d love to be able to but it’s not possible as of 8.2. To use an EntityReference workflow parameter you need to specify the entity name at compile time / when the assembly is registered. I was debating if I should add an output parameter for each OOB entity but that would be ugly and you still wouldn’t be able to support custom entities.
https://msdn.microsoft.com/en-us/library/gg327984.aspx#ReferenceTargetAttributeforEntityReferenceType
Thanks,
Aiden
LikeLike
Pingback: Creating Useful Goal Updates Via Email - Microsoft Dynamics CRM Community
Thank you!! – workflows are great!! – on the products anyway the next version could have parameters for Font style and size? so I can match it the rest of the email.
LikeLike
Thanks Randall! I thought about including font size and style early on but didn’t get to it. I’ll put it on the backlog.
LikeLike
Pingback: Microsoft Dynamics 365 Workflows: Workflow Steps - Microsoft Dynamics CRM Community
Hi I am trying to get data from a N:N relationship. Would this tool allow for that? More specifically, I have a contact entity and a qualification entity and they are linked by a N:N relationship. What I am trying to do is find all qualification names for a contact and concatenate them into one string field in the contact entity. Would this tool make this possible?
LikeLike
Hi,
Yes, you can do that. Build a query for the qualifications and link to contacts as I describe in the How To ‘Limit query results to related record’. In the columns for the search, make the name of the qualification the first column in the search result. Your workflow will be based on the contact, so call the activity ‘Query – Get Results’ and pass in the query. That activity returns a parameter ‘List – Query Results as a List’, which will be a comma separated list of whatever the first column is in your view. If you want to use semicolons instead of commas, you can set that on the ‘List – Item separator’ property on the get results activity.
Good luck,
Aiden
LikeLike
Hey Aiden, thanks for the instruction. This worked!!!
LikeLiked by 1 person
Hey Aiden, I am back. Is there any difference between installing your solution from AppSource versus just importing the zipped file?
LikeLike
Hi! No difference, except the zip file might me a slightly newer version since it takes a little while to be approved through the App Source.
LikeLike
Is it possible to generate a quote and email it similar to the example you have listed showing the order and invoice? I attempted to do this for quotes following steps similar to those you have shown for the invoice example but I can’t get it to work. You have no idea how amazing it would be if I could get this to work. Any help is greatly appreciated.
LikeLike
Hi Adam,
Yes, it’s possible. I’ll email you offline to ask some more questions about where you’re hitting problems.
Thanks,
Aiden
LikeLike
This has been the most useful Dynamics CRM plugin I’ve found!
Quick question about the Query for Results method when inserting as an HTML table into an email. Is there a way to force a width on the HTML table, such as 100%? I’m inserting the table into a draft email so I can use the Query for Recipients method, and the table gets inserted fine but the width of each column doesn’t seem to match the px width set in the view. Just wondering if there was some control over those widths.
Thanks a million for this plug-in! It’s been hugely helpful!
LikeLike
Hi Mike! Thanks for the very kind words. The workflow activities aren’t setting with width of the table or its columns. My intent was to leave it up to the viewing device so they would be rendered proportionately, but I should have made the table 100% width. That was an oversight on my part and I’ll get it in an update. Also – if you want to see what the HTML is that’s generated from the activity you can take that HTML result from the workflow and put it in a non HTML field like a Task description, then open the Task and you can see all the text of the markup.
Thanks,
Aiden
LikeLike
Hi Aiden,
Can this solution be leveraged to create a workflow that sends a PDF version of a report?
LikeLike
Hi Denise, it can be part of that solution but can’t convert doc to a pdf. I looked at that and there wasn’t a good open-source way to do that. Sorry.
LikeLike
Hi Denise,
You should check out the Ultimate Workflow Toolkit at https://butenko.pro/category/ultimate-workflow-toolkit/ It’s also free and has an activity that calls out to CloudConvert to handle the actual conversion.
Thanks,
Aiden
LikeLike
Pingback: Microsoft Dynamics 365 Workflows: Panel Discussion Series - Microsoft Dynamics CRM Community
Pingback: Workflow Heroes - Dynamics 365 for Sales Community
Pingback: Add Team Members to another Team - Microsoft Dynamics CRM Community
Pingback: Populating The Appointment Location Automatically - Microsoft Dynamics CRM Community
Hi Aiden, such a fantastic tool! I would like to use the solution for notification emails when specific fields within a Conctact entity are modified (showing old and new value). I’m working with Dynamics CRM 2016 on-premise. Can I use the solution with the on-premise CRM? Thank you! Ania
LikeLike
Hi Ania, thank you for the kind words! Yes, as of today you can install Workflow Elements on version 8.0 up through 9.x. For your specific requirement, you’ll enable auditing on that entity and field and set up the workflow to run on change of that field. To send the email, first call “Audit – Get Last Update” and it’ll pull in the audit summary with the old value and the new one, then you can put the HTML Result in your email body like any other content. Enjoy!
LikeLike
Pingback: Scheduling Recurring Emails Using A Workflow - Microsoft Dynamics CRM Community
Pingback: I love regex: Replace URL with Link in Html table output of workflow action - Microsoft Dynamics 365 Community
Hi Aiden ,
My requirement is whenever any user click on button then that moment automatically word template attach with that mail and send a mail.
Any help would be greatly appreciated!
LikeLike
Hi Shivam,
You sure can do this. Use Ribbon Workbench to add the button and have it fire a workflow (instructions on that site). In the workflow, generate your document using the OOB SetWordTemplate activity described here: https://kaskelasolutions.com/how-to-rename-a-generated-word-document/ – then you’d create an Email with the content, attach it using “Email – Attach Document”, then send it using “Email – Send Saved Email”.
Hope this helps!
Aiden
LikeLike
Hi Aiden,
I’m trying to use the count function to count the number of emails sent in a period. As this number exceeds 5,000 it is currently just returning 5,000. Is there any way to do a count using your workflow to count more than 5,000 records?
Thanks,
Simon
LikeLike
HI Simon,
If you’re using a traditional query then it tops out at 5,000 records as governed by the platform. If you’re trying to get the total count of records you could use aggregation in your FetchXml query to get the number of records. This maxes out at 50,000 records so it may be able to get you there depending on your data set.
Thanks,
Aiden
LikeLike
Thanks Aiden. Will take a look at aggregation!
LikeLike