Using actions to avoid intermediate entity

When actions were first introduced into Dynamics CRM, I did not quite understand its potential and appreciate how useful they are. But after using actions in quite a few projects, I am true believer of actions. One scenario, where I found actions quite useful is, when you have a intermediate entity, just for triggering a workflow, actions can be used to eliminate the unnecessary entity.

Here a (somewhat) simplified version of an design I worked on recently.

The SSIS Job looks into Invoice, Contact and Communication Configuration entities and creates a Communication entity record. The Communication entity stores information from both Contact and Invoice entity. It also uses Communication Configuration entity to calculate a trigger date for sending the communication.

In this design, the Communication entity exists solely for the Send Communication workflow. The entity itself doesn’t serve any useful purpose beyond that. This entity has collated some information from Invoice, Contact and Communication Configuration entities and this is used by the Send Communication workflow.

In this scenario the Communication entity can be replaced by an Action. Any attributes that are defined on the Communication entity, simply translate into input arguments on the action. The workflow that is triggered by create of Communication entity can simply be triggered from the Action. Once the Communication entity has been swapped over for an action, the SSIS task calls the action using a script task, instead of creating a Communication record.

The only disadvantage I see of using this approach is that there is no historial information when you use action i.e. I can’t simply use an Advanced Find to see when an action executed and with what parameters (unless you log it somewhere). I would get this capability if I used an entity, as I will store this information in the entity.

Advertisements