58 Saturday, May 28, 2016 |
Msxrmtools Publisher
Publisher at Msxrmtools

CRM 2011 Export, Clean and Import - Microsoft Dynamics CRM 2011

This video provides an overview of how to export data from Dynamics CRM 2011 to Excel, clean and change the data in Excel and then import the changes back into CRM.

New ways to reach more prospects with SMS Marketing

Discover new ways to reach more prospects with Microsoft Dynamics SMS Marketing. Watch this video to see how a typical SMS Marketing flow works, and learn how to leverage the high response rates of text messaging for your business. You'll see how to set up text messaging key words and short codes, configure opt-in and opt out workflows, link key words to marketing lists, manage your subscribers, and set up rules to limit touch points and avoid overwhelming them.

Update Record In Microsoft Dynamics CRM Using Early Bound

Update Method

To update record use IOrganizationService.Update(entitymethod.

Parameters

Name Type Comment
entity Microsoft.Xrm.Sdk.Entity Entity object to update

Output

Void

This method is implemented by OrganizationService class and OrganizationServiceContext generated in previous chapter.

Using Early Bound

To update object assign updated values to the fields of object.

//retrieve account to update
Account account = (Account)_service.Retrieve(Account.EntityLogicalName, _accountId, new ColumnSet(true));

//update the values
account.Name = "Update Name";
account.Revenue = new Money(500000);

You can get the object to update multiple ways for ex: using retrieve operation.

Object to update must have Guid in the Id field, when we retrieve object it is already present.

Now pass prepared object to the Update method.

 //pass object to update method
_service.Update(account);

 

Following example demonstarates how to update record in Microsoft Dynamics CRM using early bound

C#

using Microsoft.Xrm.Client.Services;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System;

namespace Msxrmtools
{
class Program
{
static void Main(string[] args)
{
//"connection" = connection string name from config file"
IOrganizationService _service = new OrganizationService("connection");

//assumed guid of existing account record
Guid _accountId = new Guid("9ec0b0ec-d6c3-4b8d-bd75-435723b49f84");

//retrieve account to update
Account account = (Account)_service.Retrieve(Account.EntityLogicalName, _accountId, new ColumnSet(true));

//update the values
account.Name = "Update Name";
account.Revenue = new Money(500000);

//pass object to update method
_service.Update(account);
}
}
}

 

Microsoft Dynamics CRM 2013 Application New Features - Security Models

Content Marketing with Microsoft Dynamics Marketing

Sales Literature: Create Sales Literature

The Sales Literature area provides a way to add, remove, and manage documents associated with products and services.

To create sales literature in Microsoft Dynamics CRM, follow these steps:

  • On the Navigation Bar, click Sales and then click Sales Literature.
  • In the Command Bar, click New.
  • In the General section of the form, enter the following information as appropriate and observe any noted restrictions or requirements as needed:
    • Title: This is a required field.
    • Subject: Type the subject or click the Lookup button and select the subject. If no subjects are listed, select Default Subject. This is a required field.
    • Type: Select from the drop-down list.
    • Employee contact
    • Expiration Date
    • Description: Type any detailed information that must be highlighted in the sales literature.
  • In the Command Bar click SAVE.

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 CRM 2011 -- Building a Dashboard

Dynamics CRM 2011 Goals - Sales Goals

This will show you how to create a sales goal suitable for an individual sales rep, and then how to create a team goal. The team goal demo illustrates the important and initially confusing concept of a "Rollup Query".
 

 

Quote Management : Quote Status

A Quote can have one of the following status:

  • Draft
    • Initially when quote is created it is in draft state.
    • Quotes must be in a Draft state to be changed.
  • Active
    • When the quote is ready to be presented to a customer, it can be activated.
    • Active quotes become read-only.
  • Revised
    • When a quote is revised, its status value changes back to Draft,
    • and the Revision ID field is automatically incremented.

What are privileges required for registering plugin?

The system user account under which the plug-in is being registered must have the following organization wide security privileges:

  1. prvCreatePluginAssembly
  2. prvCreatePluginType
  3. prvCreateSdkMessageProcessingStep
  4. prvCreateSdkMessageProcessingStepImage
  5. prvCreateSdkMessageProcessingStepSecureConfig