The default forms in Dynamics CRM only contain one set of address fields, but most organizations will need to surface at least the Address 2 fields for accounts and contacts to manage the different information for visiting address, mailing address, delivery address, invoicing address or whatever the business scenario.
Sometimes it may be justified to have a bit of redundant information in your CRM database for practical purposes. For example, if you use the Address 2 fields for managing the mailing addresses for accounts where this is separate from the visiting address, it may be easier to have the mailing address fields populated also in scenarios where the values are identical to the visiting address. Otherwise the marketing assistant who is building target groups for mailing campaigns will need to perform some Excel sorcery to pick different address fields for different customers when extracting the data from CRM.
If you’ve bought anything from online stores during the past 10 years, you’ve probably ran into a nice little feature on the checkout or registration forms where the system asks if you’d like to use the address information you entered into your customer profile also as the shipping address for the order. Often times this is presented as a checkbox field that you simply need to tick once, to save you the trouble of re-entering the same data the system already knows.
Wouldn’t this be a nice feature to have also on the CRM account form? Let’s take a look at a form where both Address 1 and Address 2 fields are presented side-by-side. If we would have a “Copy to Address 2?” checkbox that the user could tick after having tabbed through the Address 1 fields and entering data into them, that would be quite an intuitive feature that the users would surely feel right at home with. On the account form it could look like this:

Now that we have our new custom field below the Address 1 fields, next we need to build the functionality for duplicating the field values from Address 1 to Address 2. So, please open you “Javascript for Dummies” textbook from page 47 and… Hey, wait a minute! We’re working with CRM 2013 now that has the great new Business Rules feature for situations like these! Forget what I said about scripts, instead go ahead to the account entity customization menus and add a new Business Rule for this form.
On the “Copy Address 1 to Address 2” Business Rule we’ll set a single condition to monitor the value of our custom chechbox field. If the box is ticked, meaning the field value equals “Yes”, we’ll set the values of each visible Address 2 field on the form to be the same as what’s been entered into the corresponding Address 1 field.

Once we publish our customizations and activate the Business Rule, we can try out the feature in practice. Let’s create a brand new account record to simulate the typical data entry process (although an existing account would work just as well). After we’ve entered the Address 1 information on the left column, the moment we tick on the “Copy to Address 2?” box we’ll see the address fields on the right side get populated with the same values in real time.

Great, we’re all set to move this into production now! Or are we actually? What happens when the user wants to go and edit the field values for Address 2? If we leave the “Copy to Address 2” box ticked, then our Business Rule will keep copying the values over to the Address 2 fields the next time the rule is evaluated. As we’d like to allow the user to leverage this copy feature to initially replicate the fields to Address 2 but perform the necessary changes to those values that are in fact different, such as editing the Street 2 field, we should somehow restrict when our field copy operation is triggered.
One option would be to just add one more Action into our Business Rule, whereby we would set the “Copy to Address 2” field back to “No” again. One problem I see with the user experience in this approach is that since the rule runs immediately when the user ticks the box, the UI will not give a clear indication that the event was completed successfully. Sure the values get transferred, but when working with an existing account this may not be so obvious. We could present an error message through the Business Rule action, but no one likes to see a rec error icon after a successful operation.
Instead of a Business Rule that runs on the client side immediately, what we can do is to create a Real-Time Workflow rule that is run on the server side the moment that the data is submitted to the database. In the “Clear Address Copy Tickbox” rule below we’ll set the rule to be run synchronously (i.e. real-time) and attach it to the record creation event and also the field change event of the “Copy to Address 2” field. In the conditions we’ll check whether the field is currently set to “Yes” and if so, we’ll simply set the same field back to “No”.

After we activate our workflow and try the same process steps again, we’ll now see that after the account record is created or the updated address values are saved, the Copy field gets cleared automatically:

Now the user is free to go and change the Address 2 fields without having to worry about the values being overwritten with Address 1 fields every time he or she re-opens the record. If the user ever wants to repeat the Copy process, checking the box will transfer the current Address 1 values to Address 2 again.

Pretty cool, don’t you agree? Writing custom code for simple field manipulation tasks is soooo CRM 2011, now that the Business Rules and Real-time Workflows allow us to develop no-code process automation features. Extending the conditional logic of workflows to the client side where the presentation of the form and data can be change immediately after the user’s input gives us a great new toolkit for tailoring the CRM application user experience to be much more responsive, by minimizing the need for duplicate data entry and showing only the most relevant information at any given time.
As these platform features get develop further in future releases of Dynamics CRM, I believe we’ll be able to move beyond the basic question of “what data do we need to manage with CRM” and focus more of our efforts on “how should this data be presented” and ultimately “how will the users interact with the data”. Starting from the current system’s most common use cases, analyzing the user actions included in them and investigating whether they contain any potential scenarios that the CRM 2013 Business Rules features could help in streamlining is a great way to start the journey on this path towards a CRM system that your users can really love to use.

Leave a Reply