Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 137182

Forum Post: Re: silverlight to retrieve Account Id in CRM 2011

$
0
0

If you are using the Silverlight control within your form, you can use the following code within your Silverlight Application:

string accountId = App.Current.Host.InitParams["id"];

Make sure that on the form design, in the properties of the Silverlight control -> Formatting Tab check the "Pass record object-type and unique identifer as parameters".

You can also use the the dynamic object:

dynamic Xrm = (ScriptObject)HtmlPage.Window.GetProperty("Xrm");

var contactid =  Xrm.Page.data.entity.getId();

Hope this helps.


Viewing all articles
Browse latest Browse all 137182

Trending Articles



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