We recently upgraded one of our MS CRM 2011 application to MS CRM 365 and did found that whatever script we have written to change the field color it’s not working.
The reason behind this is we have switched off Legacy Rendering off and the forms are getting render using the new Turbo Form Rendering engine.
Here is the simple workaround we did found to field color change to be working-
1. First of all get the field element using parent.document.getElementById() method because document.getElementById() does not work here with new rendering engine.
var scandoc = parent.document.getElementById("scanneddocumentpath");
After getting the field element object successfully set the zeroth element style properties as shown below-
scandoc.children[0].style.color = 'blue';
scandoc.children[0].style.textDecoration = "underline";
Here zeroth element is nothing but a "ms-crm-Inline-Value" css class applied to your text box and we are setting just a property of it using the above method.
That's it, it will change the color of your text field and you don't need to enable Legacy Rendering option.
Expected out of the field look like as shown in below screenshot of the form-
No comments:
Post a Comment