Wednesday, April 24, 2013

How to access Parent Form Attribute in CRM form.


you can access the property using window.top.opener

Lets i have to access the property of parent lookup form and set into it.then you can use the following code

var previous = window.top.opener.Xrm.Page.getAttribute("customerid").getValue();
previous[0].name = Xrm.Page.getAttribute("firstname").getValue() + " " +  Xrm.Page.getAttribute("lastname").getValue();
window.top.opener.Xrm.Page.getAttribute("customerid").setValue(previous);


same way if i want to get the value from parent form then

var previous = window.top.opener.Xrm.Page.getAttribute("firstname").getValue();

This is unsupportive way.


No comments:

Post a Comment