Hi together,
Unfortunately I'm not yet so familiar with JavaScript and XRM. So I got one question.
I got two costum fields in Opportunity - "Project Size In Qm" and "Project Size In SQFT".
So now my aim is, that if one user is leaving a field after typing in a value, the other field should get the conversion value directly and automatically.
At the moment the values change, but after one value was set, saved and the page was reloaded.
Can somebody maybe help me with this?
This would be awesome
Best regards
Mick
P.S.: maybe I will change the conditions again.
function changeValueQmSqft() { var valueFieldSqft = Xrm.Page.getAttribute("projektgre_in_qm").getValue(); var valueFieldQm = Xrm.Page.getAttribute("projektgre_in_m2").getValue(); try { if (valueFieldQm > valueFieldSqft) { valueFieldQm = valueFieldQm * 10.76390578220045; Xrm.Page.getAttribute("projektgre_in_qm").setValue(valueFieldQm); } else { valueFieldSqft = valueFieldSqft * 0.092903; Xrm.Page.getAttribute("projektgre_in_m2").setValue(valueFieldSqft); } } catch (e) { } }
*This post is locked for comments