Quantcast
Channel: Forum CRM Deployment
Viewing all articles
Browse latest Browse all 997

CRM 2015 window.top.opener.parant.Xrm.Page.getAttribute

$
0
0

Hi Guys,

I got a question that causes me a lot of headaches.
We are busy with a (internal) migration from crm 2011 to crm 2015(both on-premis)

In CRM 2011 I used Javascript to get some value's from a top window. I used the window.top.opener.parant.Xrm.Page.getAttribute function for this.

I know that in CRM 2015 this function does not longer excist. We tried to find an working alternative but we can't find it.
Does anyone know a good alternative for this function?


This was the code we used in CRM 2011:

 Xrm.Page.getControl("lannet_dausername").setVisible(false);
 Xrm.Page.getControl("lannet_dawachtwoord").setVisible(false);
 if (window.top.opener.parent.document.crmForm) {
  var pp = window.top.opener.parent.Xrm.Page.getAttribute("lannet_domainadministratorpassword").getValue();
  var dau = window.top.opener.parent.Xrm.Page.getAttribute("lannet_domainadministratorusername").getValue();
  if (pp != null) {
   Xrm.Page.getAttribute("lannet_dawachtwoord").setValue(pp);
   Xrm.Page.getAttribute("lannet_dausername").setValue(dau);
  }
 }

Thanks!

Gerrit Smit


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>