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

 

 

}

Advertisements

Leave a comment

Filed under MS CRM 2011

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s