Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Silverlight unable to get XRM Object with UR 13 same is working for UR 11

$
0
0

We are facing an issue with UR13 while accessing  Xrm.Page and child objects from a Silverlight application which is embedded on Html Page which gets opened on click of a ribbon button. Interesting, same scenario is working fine with UR11. Below is the piece of code which is working on UR11 version

dynamic win = HtmlPage.Window;

dynamic opener = win.parent.opener;

ScriptObject xrm = (ScriptObject)opener.GetProperty("Xrm");

ScriptObject page = (ScriptObject)xrm.GetProperty("Page");

crmPage = page;

String Idtest = (String)crmPage.data.entity.getId();

Also, I have tried the same by directly using parent object like this but no help:

//Get the Xrm Object 
            dynamic parent =(ScriptObject)HtmlPage.Window.GetProperty("parent"); 

            //Get the Current  Record guid 
            var id = parent.Xrm.Page.data.entity.getId(); 

I have refer the below links but was not successful.

http://stackoverflow.com/questions/13231098/how-to-get-scriptobjecthtmlpage-window-getpropertyxrm-in-silverlight-appli

http://icircusmonkey.wordpress.com/2012/07/18/accessing-xrm-page-data-object-from-silverlight/

http://blog.customereffective.com/blog/2011/02/obtaining-a-reference-to-the-full-xrmpage-object-from-a-crm-2011-silverlight-application.html

Do anybody have any ideas regarding this issue. Any help would be helpful.

Thanks in Advance!!!!


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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