Thursday, July 5, 2012
Passing CRM parameters in Silverlight or to Get the cuurent record id in silverlight
public static string OrgName;
public static string EntityName;
public static Guid RecordId;
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
IDictionary<string, string> QueryString = HtmlPage.Document.QueryString;
if (QueryString.ContainsKey("orgname"))
OrgName = QueryString["orgname"];
if (QueryString.ContainsKey("typename"))
EntityName = QueryString["typename"];
if (QueryString.ContainsKey("id"))
RecordId =new Guid(QueryString["id"]);
}
to Get the cuurent record id in silverlight
_syncContext =
SynchronizationContext.Current;
_serverUrl =
ServerUtility.GetServerUrl();
{
_context =
new ccaContext(
_serverUrl),
UriKind.Absolute));
_context.IgnoreMissingProperties =
true;
{
currentRecordId =
new Guid(QueryString["id"]);
}
}
{
);
}
for more details,click here:
Subscribe to:
Posts (Atom)