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, Code: 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: To set a value: So you have to change this code: Replace with: 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.
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 = ''; }}
var varyValue = Xrm.Page.getAttribute ("CRMFieldSchemaName"). GetValue ();
Xrm.Page.getAttribute ("po_CRMFieldSchemaName"). SetValue ('My New Value');
if (! Chk4.checked == incorrect) txt .value = 'm4';
if (! Xrm.Page.getAttribute ("new_m4"). GetValue () == incorrect) Xrm.Page.getAttribute ("new_currentstatus"). SetValue ('m4');
Comments
Post a Comment