How can I retrieve dynamic CRM custom field values using java-script and perform some calculation with the values retrieved and put it to another custom field?
2 Answers
You can refer to them as to any other field on any form.
// assuming the name of your field is *Konrad*
var coder = Xrm.Page.getAttribute(“new_Konrad”).getValue();
However, if you wish to access the same data field from the context of an IFRAME populated by a web resource, you need to refer to the parent of your location by prefixing the line above by the following.
// assuming the name of your field is *Konrad*
var coder = window.parent.Xrm.Page.getAttribute(“new_Konrad”).getValue();
I can add that it's all documented in the SDK but I also need to admit that I'm not visiting it all too frequently myself either.
Comments
Refer this article to know more about the structure to access to objects through Javascript. To get values is like Konrad said, to put a value you need do that:
Xrm.Page.getAttribute("CRMFieldName").setValue('Some Value');
To do operations is apply Javascript, check this site to learn Javascript
Hope this helps