Open CRM record from Silverlight

If you are working in a project where you need to open CRM entity record , you can use below function.

first you need to get correct entity form URL to open it, you can refer http://msdn.microsoft.com/en-us/library/gg328483.aspx

once you have entity form URL, you need record GUID to open it, let’s say we want to open a account record from silverlight

private void OpenAccount(Guid ID)

{

string  _ServerURL=SilverlightUtility.GetServerBaseUrl().ToString(); //I am using silverlightutlity to get server URL

System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(_ServerURL+”/main.aspx?etn=account@pagetype=entityrecord&id=”+ID),”_blank”,”directories=no,fullscreen=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no”);

 }

HTH

 

 

}

Leave a Reply

Your email address will not be published. Required fields are marked *