CRM

CRM Business Rule “Clear Value” Not Available

I recently came across a problem where, despite using Business Rules to clear an attribute’s value in the past, it was not available for a specific field.

Added in a CRM 2015 Update, Business Rules can be used to clear field values by completing the following steps:

  1. Create new Business Rule Action:
    • Select Set Field Value
    • Select Field
    • Set Field Type to Clear

business-rule-clear

However, when I tried to do this, the Clear option wasn’t available. In this particular use-case I was trying to clear a CRM Lookup field so my initial thought was that Clear wasn’t supported with Lookups.

Thinking back, I was sure that this was possible, so I dived a little deeper. Turns out the field I was trying to clear was mandatory and that this is what was causing the Clear option to no longer be available.

The solution was to customise the Lookup attribute and set Field Requirement to Optional. Then in the Business Rule:

  1. Create new Business Rule Action:
    • Select Set Field Value
    • Select Field
    • Set Field Type to Clear
  2. Create new Business Rule Action:
    • Set Business Required
    • Select Field
    • Set Status to Business Required
  3. Activate Business Rule

This results in the Business Rule running, clearing the Lookup’s value and then making the Lookup mandatory.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s