32 Wednesday, January 4, 2017 |
Suresh Maurya
Dynamics CRM Consultant at IBM

Opportunity : Related Record To Opportunity

  • Products: View existing products that are part of the Opportunity. For example, the customer might be deciding to purchase a Mountain Bike as part of this Opportunity. This would be seen and managed within this section.
  • Activities: View existing activities or create a new activity for the Opportunity record.
  • Documents: Add a document location associated with the Opportunity record by specifying a URL of an existing SharePoint folder.
  • Connections: Add to the record an individual who has a certain role or relationship to the record.
  • Audit History: View the edit history of the Opportunity record. This also captures the date and time of the modification, along with the old and new values of the specified fields.

What's New in CRM 2011 Session 2: Charts and Dashboards

Using Auditing - Microsoft Dynamics CRM 2011

In this video we demonstrate the 3 levels of control related to auditing.

We also demonstrate the Audit View and Audit Summary features.

Deployment Web Service in Microsoft Dynamics CRM

In Microsoft Dynamics CRM you can use the Deployment Web service (Deployment Service) as a programmatic alternative to using the Deployment Manager. This allows you to manage organizations, servers, and licenses for deployments of Microsoft DynamicsCRM.

With Deployment service you can create solutions to do the following:

  • Manipulate the organization entity to create, import, upgrade, enable or disable organizations. 
  • Retrieve and view Microsoft DynamicsCRM license information for a deployment. 
  • Update deployment configuration settings. 
  • Add or remove deployment administrators. 
  • Enable, disable, or delete servers.
  • Update settings that are stored in the configuration database.
  • Enumerate and change state of servers in the deployment.
  • The deployment service works with Windows integrated authentication (Active Directory) only.

Deployment service URL

http://myservername/xrmdeployment/2011/deployment.svc

Multiple Ways To Connect To Microsoft Dynamics CRM Using Organization Service, Proxy and Context

Microsoft Dynamics CRM can be connected programmatically using following:

  • Organiation Service
  • Organization Service Proxy
  • Organization Service Context 

Using Organization Service

Simplest way of connecting to Microsoft Dynamics CRM is using OrganizationService.

OrganizationService constructor can take connection string or CrmConnection object as parameter.

public OrganizationService(string connectionStringName);
public OrganizationService(CrmConnection connection);

Method 1

Pass the connection string name to constructor.

IOrganizationService service = new OrganizationService("connection");

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity); 

Method 2

In CrmConnection constructor pass the connection string name, which further should be passed in OrganizationService constructor.

CrmConnection connection = new CrmConnection("connection");
IOrganizationService service = new OrganizationService(connection); //System.configuration

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity); 

CrmConnection requires following additional assembly to be referenced.

System.configuration 

Method 3

Use CrmConnection.Parse method to create CrmConnection object and pass that to OrganizationService constructor.

string connString="Url=http://crm.contoso.com/xrmContoso; Domain=CONTOSO; Username=jsmith; Password=passcode;";

CrmConnection connection = CrmConnection.Parse(connString);
IOrganizationService service = new OrganizationService(connection); //System.configuration

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

service.Create(entity);

Using Organization Service Proxy

OrganizationServiceProxy class provides a proxy to connect to Microsoft Dynamics CRM.

Use following constructor to create the proxy.

public OrganizationServiceProxy(
Uri uri,
Uri homeRealmUri,
ClientCredentials clientCredentials,
ClientCredentials deviceCredentials
)
Parameter Description
uri The URI of the organization service.
homeRealmUri

This parameter is set to a non-null value when a second ADFS instance is configured as an identity provider to the ADFS instance that Microsoft Dynamics CRM 2011 has been configured with for claims authentication. The parameter value is the URI of the WS-Trust metadata endpoint of the second ADFS instance.

Pass null in this case

clientCredentials The logon credentials of the client.
deviceCredentials

The Windows Live ID device credentials.

Pass null in this case

Following sample code connects to Microsoft Dynamics CRM using OrganizationServiceProxy

Uri oUri = new Uri("https://yourorg.api.crm5.dynamics.com/XRMServices/2011/Organization.svc");
//** Your client credentials
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "YourAccount.onmicrosoft.com";
clientCredentials.UserName.Password = "YourPassword";

//Create your Organization Service Proxy
OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy( oUri, null, clientCredentials, null);

//** Now simple use Entity and create a sample account
Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

//use the service proxy to create the entity object
_serviceProxy.Create(entity);
}

Using Organiation Service Context

OrganizationServiceContext is alternative to OrganizationServiceProxy to connect to Microsoft Dynamics CRM programmatically.

To create OrganizationServiceContext object pass IOrganizationService object to constructor.

IOrganizationService service = new OrganizationService("connection");
OrganizationServiceContext context = new OrganizationServiceContext(service);

Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

context.AddObject(entity);
context.SaveChanges();

context.AccountSet.ToList().ForEach(a => Console.WriteLine(a.Name));

OrganizationServiceContext class can be generated by the code generation tool (CrmSvcUtil.exe). 

 

Microsoft Dynamics CRM Online 2015 Update 1 - Customizations New Features

Partner Landscape: Microsoft Dynamics CRM

Learn more about the opportunities for being a partner with Microsoft Dynamics CRM.

Microsoft Dynamics CRM 2011 and Outlook

This demo shows how Microsoft Dynamics CRM 2011 works inside Microsoft Outlook, making it easier than ever to keep track of customer information.
 

 

Microsoft Dynamics CRM Developers help guide

mydynamicsmscrm.wordpress.com

Update Process Enhancements with Microsoft Dynamics CRM Online 2015 Update

Invoice Management

Invoices are requests for payment from a business to its customers.

Color Grid for Dynamics 365

Color Form for Dynamics 365