3

Microsoft Dynamics has been nothing but a charm to work with. MS Dynamics CRM is a really good technology but lately everything starts to ... sucks?

Reading from many places i was aware that roll up 12 have some bugs, but i have one customer that works with CRM online and bam! get the update automatically two weeks ago.

And has been a nightmare.

No ribbon buttons support, many bugs all over... and yesterday, i wrote a script to disable a field, that mysteriously change the process form view (new view) to the classic view. Weird.

Does Anyone knows if the script design for ru12 has changed? or is it me and my script that is wrong.

function disablefield() {

  //alert ("pass");
  var disable = false;
  var cc = Xrm.Page.getAttribute("field").getValue();

  if (cc == 1) {
     disable = true;
  }
  Xrm.Page.ui.controls.get("anotherfield").setDisabled(disable);

  //alert ("pass");
}
Charles
  • 50,943
  • 13
  • 104
  • 142
Sebas Tian
  • 65
  • 6
  • In my experience it is more how the code is being called (and when) - can you describe how the script is being called, show the whole function etc – glosrob Mar 14 '13 at 13:47
  • The script is set On-Save, it's added as a library on the form and it is called for his name "disablefield". I've updated the code above. – Sebas Tian Mar 14 '13 at 14:42

2 Answers2

3

Javascript code doesn't work in new process view. In future i think this would be supported but now isn't possible.

Pedro Azevedo
  • 2,507
  • 1
  • 16
  • 22
  • there is a way to make it work? all i need is to disable a field, depending on another field's value. – Sebas Tian Mar 14 '13 at 14:44
  • Yes, turn back to classic forms :D, see this [article](http://nakedcrm.wordpress.com/2013/02/12/limitations-of-the-new-updated-forms-process-flow-top-10/) with more information – Pedro Azevedo Mar 14 '13 at 15:01
  • Ok thats exactly what i didn't wanted haha ... anyawy it seems that it's the only way to do it. Thanks! – Sebas Tian Mar 14 '13 at 15:05
1

JS execution system has been remodeled in RU12. Sadly, there are a number of bugs that were introduced. I've seen some funny reports when one saves a form and closes it. Depending on the order of the statements, one gets a number of different behaviors. None of them correct. :)

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
  • This is ugly, CRM 2011 was working pretty well without this "update". When u said "remodeled"... what do u mean? u have any example of some remodeled JScript ?? Thx for the answer! – Sebas Tian Mar 18 '13 at 21:31
  • 1
    Try saving a form and closing it directly afterwards. You'll get the behavior that you get a question if you want to discard the changes or save them. If you select discard, they still get saved anyway (or something like that - I can pull out the exact description, if it's important). Quite quirky behavior, hehe. – Konrad Viltersten Mar 19 '13 at 00:50