Wednesday, December 3, 2014

Strange behaviour of the two options(Boolean) field in CRM2013

Last week, I came across a strange behaviour of the two options field in CRM2013. I am not sure if it is a bug or it is by design.

Scenario

I have a boolean field on an entity. This field is not added to the form. The default value of the field is set to false. When a new record is created in CRM, the integration process copies the record into the external system and updates the boolean field to true in the CRM. This boolean field indicates if the record is copied to the external system or not.

It works perfectly expect in the following scenario.

If the user updates the  record immediately after creating the record without closing the form, CRM will reset the value of the boolean field back to false. According to me, it is a bug. CRM should not pass the un modified fields to the save method.

The following screen shot displays the audit history of the field.

image

Solution

Add the field to the form.

8 comments:

  1. Interesting... is Auto Save enabled?

    ReplyDelete
  2. I agree with the previous comment. In most likelihood, Auto Save is enabled, and the record is saved automatically. Can you please confirm?

    ReplyDelete
  3. Even if Auto Save is enabled this should not be happening and might have a huge impact on your processes/workflows

    ReplyDelete
  4. Auto Save is enabled but it should not matter. I am saving the record manually.

    ReplyDelete
  5. Amreek, you are correct. It looks like it is a bug. Where able to test an option set and see id you can replicate the behavior?

    ReplyDelete
  6. Congratulation,for the post.This is a very costly present.I am so satisfied to get this
    post article.I was anticipating get such a post which is exceptionally useful to us.
    Keep it up. .I know something data, to know you can click here
    Zutrittskontrolle Gesundheit
    Zutrittssysteme Verein

    ReplyDelete
  7. We have seen this too. Very very dangerous when we, just like you, use that bool to control business logic.
    Adding the field invisible on the form solved the problem for us.

    ReplyDelete
  8. you are correct. it's find it irresistible could be a bug. wherever able to take a look at associate degree choice set and see id you'll be able to replicate the behavior? Salesforce Training in Chennai

    ReplyDelete