locked
CRM 2016 - OOB Bit field (Yes/No) bug? RRS feed

  • Question

  • Hi,

    We (might) have come across a (mighty) bug/flaw in CRM 2016 regarding two options (bit) field with Yes/No as option labels.

    Usually we know that No = 0 (false) and Yes = 1 (true). However, we have seen that in 2016, two options field values are flipped. Example, Confirm Interest, which is a OOB two options has Yes as 0 and No as 1. We discovered this while doing JavaScript getValue() on the form where we always got true even when the value was visually false on the field.

    When we checked with other OOB fields, example Complete Internal Review,  with two options but with different label, ‘mark complete’ and ‘complete’, the values there are correct as it used to be till CRM 2015. Mark complete = 0 (false), completed = 1 (true).

    We tried flipping the labels for the Yes/No fields but as soon as the field updates the page loads back with initial values. We also tried changing the labels from Yes (currently 0) to  ‘mark complete’ and No (currently 1) to  ‘complete’, but same result, the page loads back with initial value.

    When we create a new custom two options field, the values are as per CRM 2015, Yes = 1 and No = 0. The issue is only limited to OOB bit fields with Yes/No as labels.

    We have verified this problem with multiple CRM 2016 instances and our clients are really upset with this major overhaul.

    It is not that we cannot live with it and code according to the new flipped values, but how many fields and how many entities we would not need to keep track of this for? And some of these fields are already existing in previous versions. It would to be to be a catastrophe when you are migrating from previous CRM version or when you are renewing your platform to CRM 2016.

    Has anyone come across this issue? And if yes, how did you deal with it?

    Is Microsoft CRM team aware of this major bug? Was this, as usual, "by design"?

    Thanks

    https://connect.microsoft.com/dynamicssuggestions/feedback/details/2283517/crm-2016-bit-field-big-issue



    Ahmad Pirani
    Green Beacon Solutions


    • Edited by Ahmad Pirani Wednesday, January 27, 2016 4:45 PM
    Tuesday, January 26, 2016 9:02 PM

All replies

  • I don't think anything has changed from 2015 to 2016.

    I don't think you can really compare a two option field in CRM to boolean logic in it's strictest sense since you can enter any text to associate with the value (red/blue, up/down,etc.) that isn't actually related to true/false only. If you try and apply boolean logic to some of the fields on Opportunity the text to 1/0 values doesn't make sense with the 1 = No & 0 = Yes comparison - like Confirm Interest. 

    I looked at a 2015 org. and Confirm Interest is set up the same way where No = 1 & 0 = Yes - just like in a 2016 org. 

    I also created a new two option field in both orgs and saw that by default No = 0 & Yes = 1


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Tuesday, January 26, 2016 11:08 PM
    Moderator
  • I agree with you that the CRM 2015 and 2016 have the same (in)consistency.

    However, the expected behavior is like other bit fields.

    When you do Xrm.Page.getAttribute("bitfield").getValue(), it returns Boolean, true or false. Same with setValue(), it takes Boolean. It does not make sense to work with getText(). The same is the case when you are accessing or setting values for a bit field using .NET code. How are you expected to individually keep track of such fields that behave in opposite manner than rest of their counter parts?

    Besides that, it won't even allow you to change the label to flip it from your end which makes it impossible to use.

    Here is a new opportunity with a business process. The first stage contains Qualified (which is Confirm Interest field), that loads with No (1/true) and a check mark. This is confusing to the user and programmatically since a checkmark is expected after you change the field. Programmatically because, on save of the form when we access the value, for a No it returns true and for Yes it returns false.

    Looks like this after you save without making any changes.

    We have a logic to move the process ahead if Qualified is true, which now is with NO (returning True) and hence the process bar moved to next stage.

    Now after you change the Qualified to Yes, it becomes italic blue, which indicates that the field has been reset to its original value and that user has made no change and the checkmark in front of the field gets unchecked as well. Which is confusing, incorrect and gives false impression.

    As I said, it is not possible to individually keep track of such field that behave in opposite manner than the rest of them.



    Ahmad Pirani
    Green Beacon Solutions





    • Edited by Ahmad Pirani Wednesday, January 27, 2016 2:01 AM
    Wednesday, January 27, 2016 1:11 AM
  • Hi,

    I haven't seen this behaviour myself but as Jason Points out, you can set the label yourself on the two option fields so why don't you just change 1 to yes and 0 to no?

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Wednesday, January 27, 2016 8:13 AM
  • I wish CRM would let you do that. As I mentioned in my first email, CRM does not let you rename Yes/No bit field option text.



    Ahmad Pirani
    Green Beacon Solutions

    Wednesday, January 27, 2016 4:05 PM
  • Hi Ahmad,

    I have just experienced the error you are currently experiencing and we have managed to rename it by going to the default solution, rename the oob two option set fields and PUBLISH ALL not just the entity (opportunity) but the whole solution. I hope that this would also solve your problem. Have a good day

    Arvin


    Friday, November 17, 2017 4:23 PM