Tip #420: If your child workflow needs more than one entity

CRM workflows always require an entity to run. But what if you’d like to create a child workflow but need more than one entity or additional parameters? For example, while identifying the business opportunities for a professional photographer, you may want to invoke a workflow called Book the ceremony that involves two people. Let’s assume that someone else on your team will be creating the workflow taking care of the details such as whether it’s a civil or religious ceremony, genders of parties involved, dates, etc.

Option 1

Call custom actionIf your deployment is on CRM Online 2015 Update 1, child process can be created as a global, i.e. not requiring a specific entity instance, custom action.

Note:Do not declare your parameters as Entity – that will make the action not available in workflow UI.

Option 2

Call child workflowIf you don’t have access to all the wonderful new features in CRM Online then you can use what I call a “piggy-in-the-middle” approach: design a helper entity that would hold all the information required, create an instance, fill all the fields and pass that instance into a child workflow.

Note:Since there is no delete operation in CRM workflows, and if workflow volume calls for it, you’d probably want to execute a cleanup bulk delete job removing piggy instances for the completed workflows.

I think I owe myself a treat
Gaytime Multipack

Leave a Reply

Your email address will not be published. Required fields are marked *