2

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 2

6

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.

Sign up to request clarification or add additional context in comments.

Comments

3

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.