Hi,
I have a parent form which opens a child window on click of a ribbon button.
This child window has an iframe which has got ok and cancel button.
Now on click of ok i want to set a value from child window to parent window.
i have tried many methods to access parent window.
Below is my Ok click code
function saveOnClickOfOk(){
toUser = parent.Xrm.Page.getAttribute("vsds_touser");
if(toUser.getValue()){
var lookup = new Array();
lookup[0] = new Object();
lookup[0].id = toUser.getValue()[0].id;
lookup[0].name = toUser.getValue()[0].name;
lookup[0].entityType = toUser.getValue()[0].entityType;
window.top.opener.parent.Xrm.Page.getAttribute("vsds_assignedto").setValue(lookup);
}
parent.Xrm.Page.data.entity.save("saveandclose");
}
Please suggest a solution