This is an alternative method of doing the same thing we talked about with this post.
Jon G from Microsoft Consulting was the first guy to poke a whole in the Pesky Name Field posted last week. He has a point, Client Side Scripts do not work in Bulk Edits or on Imports, etc.
So based upon another comment left on this article, I decided to try Workflow. Not only did it stop me from writing code, it was pretty fast. 🙂 The only downside that I could see if this was a required field, workflows don’t fire until the record is saved. Plus I could make the field read only and not having to force submit it.
All I did was create a Workflow rule that fired on Create or the changing of the Agency or Program fields on a Contract. (I have been working on a miniature Government Contracting solution for customers here in DC.)
In it, I just did an update of the Contract Name Field using two dynamic values and the word "for".
Here is the contract with the original values. (And if you are sharp eyed, you see I put the EPA in the wrong field, which is corrected in the next screen shot.) As you can see the name is "Ben was here."
As soon as the record saved, I was able to open it back up and you can see the workflow rule updated the Name field the way it was specified.
While this may not be as fast as a Plug-In, this is better for me as it allows me to cheat and not write code.