CRM2016 – Two Options field bug

Today I found a bug inside CRM2016; I upgraded CRM2013 to CRM2016 and I have some Form Legacy.

On Form I have a field with name “Select Product”. This field has two value to choose:

  1. Existing
  2. Write In

field_error2

When I open this form, I have always “FALSE” as default value:

field_error1

I tried to delete and re-create but I always have the same problem. I don’t find a solution but I found a workaround in javascript: I created a method to manually force the change value:

attribute attr1 = Xrm.Page.getAttribute("nameattribute");
if (attr1 != null)
{
attr1.setValue(1);
attr1.setValue(0);
}

field_error3
 

I don’t understand if this is a CRM2016 problem or it is my problem…

 

4 thoughts on “CRM2016 – Two Options field bug

  1. script to fix this bug:
    function fixBoleanFieldsBug() {
    var count = Xrm.Page.getAttribute().length;
    for (var i = 0; i < count; i++)
    if (Xrm.Page.getAttribute()[i].getAttributeType() == "boolean") {
    var val = Xrm.Page.getAttribute()[i].getValue();
    Xrm.Page.getAttribute()[i].setValue(null);
    Xrm.Page.getAttribute()[i].setValue(val);
    }
    }//refresh all boolean fields

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...