I thought I’d present a simple way that is easy for nonprogrammers to maintain. We also use this as a precursor to writing a plug-in if it evolves into something that would work better as a plug.
The basic concept is to create a workflow which is triggered automatically on the creation of a record in a particular entity. This workflow can have a number of steps that are designed to review the values of the new record, and to update any missing values automatically before ending or calling another workflow.
I like to use a naming convention that identifies the entity followed by a triple zero such as the example workflow for this article: TS:000: Data defaults & Init. This workflow is currently part of our Advanced Training Operations Management (ATOM) XRM product and will later be placed in the plug-in once all the specs are finalized.
To create a workflow and publish it, you take advantage of the “Options for Automatic Workflow” in the workflow properties. This solution assumes that the publisher of the workflow has the appropriate rights to the entity that needs to be updated.
as you can see on the form, we have set the scope to “Organization”, and checked the “Record Is Created” box on the form. This causes the workflow to be automatically started for each new record is created on the system. You can also kick off similar workflows when a record changes as the automatic options are very powerful in CRM 4.0.
Next, you build up a workflow statements to do the appropriate tests and update the entity record as required. While it’s not the most efficient thing in the world, it gets the job done either for prototyping or live systems. The main advantage is that it does not require any .net or Jscript programming and is easy for customers to modify. Here’s an example of a logic we use for the workflow displayed earlier in this article.
I hope this gives you some ideas of things you can do with these workflows.
Have a great week!
Stephen V. Noe, CRM MCT