Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I retrieve dynamic CRM custom field values using java-script?

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?

like image 433
Rohit Avatar asked May 16 '26 21:05

Rohit


1 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.

like image 60
Konrad Viltersten Avatar answered May 19 '26 11:05

Konrad Viltersten