Posts

make relationship in Microsoft CRM SDK

If you want to make 1 to N relation between two entities in CRM. You have couple ways.I would like to share two of them. First of all; You can make relation after creating new record .                         CustomEntityInCRM1 referrerEntity = ...//retrieve data;                         CustomEntityInCRM2 referencedEntity = ...//retrieve data;                         Relationship rs = new Relationship(" ");                         EntityCollection relatedEntities = new EntityCollection                         {                             EntityName = referencedEntity.LogicalName,                             Entities = {                                 referencedEntity                             }                         };                         referrerEntity.RelatedEntities.Add(rs, referencedEntity);                         _serviceProxy.Update(referrerEntity); or you can retrieve two of them and make connection (prevent 'The collection is re

Everything about Log4Net

log4net is a library to help the programmer output log statements to a variety of output targets by Apache Software Foundation (official page = http://logging.apache.org/log4net/).You can also download either source code or compiled library. It is compatible for .net project(s) and need to know couple basic things to use in your project easily. First of all, There is a configuration you have to set before adding into your project. Here is a sample about inserting log into a given file. app.config file;    <!--Start Code-->       <?xml version="1.0" encoding="utf-8" ?>          <configuration>             <configSections>                   <section name="log4net"                   type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>                </configSections>          <startup>             <supportedRuntime version="v4.0" sku=".NETFramework,

how to call any Web Resource image in your web page from CRM 2011

Hi, You can call Web Resource from crm easy. Just add; http(s)://CRM_url:(port)/WebResources/nameOfTheWebResource or /WebResources/nameOfTheWebResource in CRM do not use "Display Name" and "extension". Good Luck,

retrieve,update,assign,create related object records in Microsoft CRM 2011

Hi, here is a sample of how to obtain records from CRM. You need prebuild classes from current Microsoft CRM 2011 deployment.to do this use crmsvcutil.exe which comes from CRM SDK (...SDK\bin\). Built Class includes both standart Entities and Custom Entities. Usage : crmsvcutil.exe /url:http(s)://crm.???.com(:444)/organization_name/XRMServices/2011/Organization.svc /out:" \OrganizationCodes.cs " /username:muhammet.atalay /password:ILoveCrm /domain:??? /serviceContextName:...ServiceContext Do not forget to add OrganizationCodes.cs into your project. ServiceContext uses as below while retrieving any records via LinQ. ServiceContext context;            context = new ServiceContext((IOrganizationService)_serviceProxy); List contacts = context.ContactSet.Where(c => c.fieldName == criteria).ToList(); you can create a record as follow; Contact conn = new Contact(); set fields _serviceProxy.Create(booking); assign record to a user while creating record exampl

Credentials,tokens sample in Microsoft CRM 2011 from SDK by Late Bind Approach with IFDS deployment

Hi, First of all, Download Microsoft CRM 2011 SDK from Microsoft Web Site.Please ask google for exact URLs. do not forget adding Microsoft.xrm.sdk library from SDKs. IServiceManagement orgServiceManagement = ServiceConfigurationFactory.CreateManagement ( new Uri("http(s)://crm.???.com(:444)/organization_name/XRMServices/2011/Organization.svc")); Set the credentials. AuthenticationCredentials authCredentials = new AuthenticationCredentials(); authCredentials.ClientCredentials = new ClientCredentials(); authCredentials.ClientCredentials.UserName.UserName = "muhammet.atalay"; authCredentials.ClientCredentials.UserName.Password = "I Love CRM"; AuthenticationCredentials tokenCredentials = orgServiceManagement.Authenticate(authCredentials); Retrieve Token SecurityTokenResponse orgTokenResponse = null; if (tokenCredentials != null)

Installation of Microsoft Visual C++ Runtime failed. Exit code: 5100. Result: Asia in Microsoft Dynamics CRM 2011

If you face an error about Installation of one or more missing prerequisite components while installing Microsft Dynamics CRM 2011 server (i met some consultants who get same error while installing CRM for Outlook Client).it is related with version of Microsoft Visual C++ Redistributable package running on the server. Here is the story of me; I wanted to try install Microsoft Dynamics CRM 2011 into Microsoft Windows 2008 R2 x64 Enterprise server which has already Microsoft SQL Server 2012 Developer Edition. I got an error during installing prerequisite. I checked logs from "C:\Users\Administrator\AppData\Roaming\Microsoft\MSCRM\Logs\crm50svrsetup.log" and found; 11:18:45| Info| CmdLine: <"D:\Redist\VcRedist\vcredist_x64.exe" /q /norestart> 11:18:45| Info| WorkingDir: 11:18:53| Info| Installation of Microsoft Visual C++ Runtime failed. Exit code: 5100. Result: Asia 11:18:58| Error| Installation of one or more missing prerequisite c

An error installing Microsoft SQL Server 2008 about .NET Framework 3.5 SP1

Hi, if you are facing an error regarding .Net Framework 3.5 SP1 needs to be installed please follow below; I think the problem is about .NET Framework pre-requirement files have some problem. Copy your SQL setup media to your local hard disk. 1. Download .NetFramework 3.5 SP1 (which corresponds to your architecture - x86, x64 or i64) 2. Do not try to install it by double clicking it, rather extract it first to a location of your choice by issuing this command .exe /x:c:\dotNetFramework35SP1\ for example dotNetFx35Setup.exe /x:c:\dotNetFramework35SP1\ (whatever the name is just use it) 3. Open the folder where you extracted the files. You will find a folder named "wcu" open this folder as well. You will find a folder named "dotNetFramework". 4. Copy everything inside this folder. 5. go to SQL2008 setup folder > FOR EXAMPLE x86, x64 > redist > dotNetFrameworks 6. Paste your files there (replace if prompted). good luck...