Monthly Archives: September 2011

Insert Custom button in CRM Form and Grid

Download you entity cutomization and replace <RibbonDiffXml></RibbonDiffXml> with below code <     RibbonDiffXml> <     CustomActions> <     CustomActionId=“Sample.opportunity.form.sendemail.CustomAction“Location=“Mscrm.Form.opportunity.MainTab.Actions.Controls._children“Sequence=“10“> <     CommandUIDefinition> <     ButtonId=“Sample.opportunity.form.sendemail.Button“Command=“Sample.opportunity.form.sendemail.Command“LabelText=“$LocLabels:Sample.opportunity.sendemail.LabelText“ToolTipTitle=“$LocLabels:Sample.opportunity.sendemail.LabelText“ToolTipDescription=“$LocLabels:Sample.opportunity.sendemail.ToolTip“TemplateAlias=“o1“Image16by16=“$webresource:aaron_AddEmail_16“Image32by32=“$webresource:aaron_Email_32“ /> </     CommandUIDefinition> </     CustomAction> < … Continue reading

Posted in MS Dynamic CRM 2011 | 11 Comments

Image (JPG, PNG, GIF, ICO) Web Resources

Capabilities of Image Web resources With image Web resources you can add images where you need them. Common uses include the following: Custom entity icons Icons for custom Ribbon controls and SiteMap subareas Decorative graphics for entity forms and Web … Continue reading

Posted in MS Dynamic CRM 2011 | 6 Comments

Change contact Opportunity view default filter

  function         filterOpptyGrid() {       var navOpps = document.getElementById(‘navOpps’);       if (navOpps != null && navOpps != undefined) {   navOpps.onclick =     function () {   loadArea(     ‘areaOpps’); … Continue reading

Posted in MS Dynamic CRM 2011 | 14 Comments

Sample code for using the CrmOnlineQueryManager on online version

  const         string username = “myLiveId”;       conststring password = “myPassword”;       conststring organization = “myOrgName”;       publicstaticvoid LogError(Exception ex)   {   CrmOnlineQueryManager queryManager =     new CrmOnlineQueryManager(); … Continue reading

Posted in MS Dynamic CRM 2011 | 10 Comments

Code to configure CRM API Service

  ClientCredentials credentials =     new ClientCredentials();   credentials.Windows.ClientCredential =     new System.Net.NetworkCredential(“username”,“password”,“domain”);     Uri         organizationUri = newUri(“http://servername:port/orgname/XRMServices/2011/Organization.svc”);     Uri         homeRealmUri = null;   OrganizationServiceProxy orgService =   … Continue reading

Posted in MS Dynamic CRM 2011 | Comments Off

check table usage of Dynamics CRM in SQL Server

1. OPEN Query analyzer of SQL Server 2. OPEN MS CRM database Run the query like this exec sp_MSforeachtable @command1=”EXEC sp_spaceused ‘?’” It will show you all table statistics with index size, row size etc ……

Posted in MS Dynamic CRM 2011 | 11 Comments

code to check user in Role

if(UserHasRole(“System Administrator”)) {  alert(‘System Administrator’);}     function         UserHasRole(roleName)   {       var serverUrl = Xrm.Page.context.getServerUrl();       var oDataEndpointUrl = serverUrl + “/XRMServices/2011/OrganizationData.svc/”;   oDataEndpointUrl +=     “RoleSet?$top=1&$filter=Name eq ‘” + … Continue reading

Posted in MS Dynamic CRM 2011 | Leave a comment

Refresh Opportunity subgrid on tab expand

In this article , I am explaining how to we can refresh entity page subgrid and chart control on tap expand. I have created one tab with id “tab_oppty” and as we expand that tab and on tab expand our … Continue reading

Posted in MS Dynamic CRM 2011 | 8 Comments

Create Note Entity Record

  ServerConnection serverConnect =     new ServerConnection();   ServerConnection.Configuration config = serverConnect.GetServerConfiguration();   OrganizationServiceProxy _serviceProxy;       var creds = new ClientCredentials();       using (_serviceProxy = new OrganizationServiceProxy(config.OrganizationUri,   config.HomeRealmUri,   config.Credentials,   config.DeviceCredentials))   { … Continue reading

Posted in MS Dynamic CRM 2011 | 11 Comments

Mark Activity as Complete

Paramerter _type is activity type like : Fax,Email,Letter,Appointment,Task public     void CompleteActivity(string _activityid, string _type) {   ServerConnection serverConnect = newServerConnection();   ServerConnection.Configuration config = serverConnect.GetServerConfiguration();   OrganizationServiceProxy _serviceProxy;   var creds = newClientCredentials();   using (_serviceProxy = newOrganizationServiceProxy(config.OrganizationUri, … Continue reading

Posted in MS Dynamic CRM 2011 | 10 Comments