Microsoft Dynamics® CRM Training
Populating a Hidden Field
An error occurred while loading the video. Please try again.
In the “Standardizing State/Province Field” lesson, we discussed the benefits of replacing a single line of text field with a global option set in Microsoft Dynamics CRM. The example we used was the default State/Province field, a single line of text field. This can lead to a variety of inconsistencies in how a state name is entered. With a global option set though, the User can choose from a list of predefined options, thus unifying data entry for the field.
Once we created the global option set and new field, we replaced the default State/Province field. There is one drawback to this though: the Dynamics CRM integration with Outlook requires the field be a single line of text for the field to sync with Outlook contacts. As a result of removing this default field, some of our Outlook contacts will be without states in their address.
There is a workaround for this though, and it can be applied to any default field you replace with a custom one. We can keep the default field on the form, create a workflow to populate it, and then make it invisible. To do this though, we’ll need a Security Role of System Administrator or equivalent privileges.
Before we begin, verify that both the default and custom fields are present and visible on the form of the record type you are working with. In this lesson, we’re working with the Lead entity, but these tasks can be extended to other record types.
Creating the Workflow
- Navigate to Settings > Process Center > Processes. Click New in the toolbar.
- The Process window opens. Enter a Process Name, designate the Entity (Contact in this lesson), and select Workflow in the Category field. Click the OK button.
- The Process window opens. In the Start when area, deselect Record is created, and then check the Record fields change box.
- Click the Select button, which opens the Select Fields window. Locate your custom field (State in this lesson), check its box, and then click the OK button.
- Click Add Step and select “Update Record”.
- Enter a description, make sure the entity is selected (Contact in this lesson), and then click the Set Properties button.
- The Information form of the entity opens. Click the default field that is being replaced (State/Province in this lesson).
- In the Form Assistant, set the Dynamic Values to “Set to”, “Contact”, and “State”. Click the Add button and then click OK.
- Save and Activate the Workflow.
Make a field invisible on a form
- Open a record containing the field (Contact in this lesson).
- Open the Form Editor by clicking the Customize tab in the ribbon, and then Form.
- Double-click the field (State/Province in this lesson)
- The Field Properties window opens. In the Display tab, uncheck the Visible by default box, and then click the OK button.
- Save and Publish your changes
For more tips, tricks, and tutorials, please refer to the Success Portal and blog.xrm.com.