javascript - Microsoft Dynamics: Value of the field shows on the form, but it doesnt show on the grid view -


I have a problem with the visibility of the field value I'm using MS Dynamics CRM Later, in the form, the value of this field is fully visible, however, it does not turn on the view

I have tried, onSave , onLoad , read only etc and it just does not work. I also debug it, and there was no error. I do not know what the problem is.

Code: function change_currentstatus () {var chk0 = document.getElementById ('New_pc1'); Var chk1 = document.getElementById ('new_m1'); Var chk2 = document.getElementById ('new_m2'); Var chk3 = document.getElementById ('new_m3'); Var chk4 = document.getElementById ('new_m4'); Var txt = document.getElementById ('new_currentstatus'); If (! Chk4.checked == incorrect) {txt.value = 'm4'; } And if (! Chk3.checked == incorrect) {txt.value = 'm3'; } And if (! Chk2.checked == incorrect) {txt.value = 'm2'; } And if (! Chk1.checked == incorrect) {txt.value = 'm1'; } And if (! Chk0.checked == incorrect) {txt.value = 'pc1'; } Else {txt.value = ''; }}

Perhaps there is something wrong with the settings, or javascript is my first observation: use the CRM 2011 Javascript object model, start over again. So use this to read a field:

  var varyValue = Xrm.Page.getAttribute ("CRMFieldSchemaName"). GetValue ();   

To set a value:

  Xrm.Page.getAttribute ("po_CRMFieldSchemaName"). SetValue ('My New Value');   

So you have to change this code:

  if (! Chk4.checked == incorrect) txt .value = 'm4';   

Replace with:

  if (! Xrm.Page.getAttribute ("new_m4"). GetValue () == incorrect) Xrm.Page.getAttribute ("new_currentstatus"). SetValue ('m4');    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -