Showing posts with label CRM On-premise. Show all posts
Showing posts with label CRM On-premise. Show all posts

Tuesday, May 12, 2009

Bulk Delete Operations for Dynamics CRM 4 On-Premise


It is often that have you come across when you wanted to delete records from CRM in bulk.

The only option you have to delete multiple records in CRM is by selecting all records available in one page of a view and then hit delete. A view can have at max 250 records displayed. So if you need to delete more than that you have no choice but to navigate through each page and delete the records.

Since we do a lot of conversion projects we need to delete previously imported records before running the conversion. And this was too much of a task...

We started working on developing our own little project that will do the job. CRM has made available the BulkDeleteRequest Message in CRM SDK that allows us to delete more than one entity records at a time.

The BulkDelete Message will create an asynchronous job that can be monitored through the System Jobs Menu option.

You can provide the record selection criteria by specifying the query that needs to be executed to get the records over which the action needs to be performed.

If you want this to a recurring job to be executed say every x days, you can set the RecurrencePatern of the BulkDeleteRequest Message.

Since the bulk delete operation can be run on any entity and it requires a query to be provided, we thought of generalizing this. We developed a small tool that allows the users to specify the parameters for the Bulk Delete Job in user friendly interface. These jobs can be monitored in the system jobs window.

Anyone who would like to get this tool without having to re-invent the wheel can check details at http://www.inogic.com/addons_bulk_delete.htm

Thursday, April 16, 2009

Intuit QuickBooks integration link with Dynamics CRM 4.0 released

QuickBooks is one of the most popular accounting packages for the SME segment. There has always been a need to integrate CRM with accounting system to avoid duplicity as well as to improve productivity and efficiency by providing the sales people using CRM a view of the financial details of the customer so as to enable them to handle the sales/marketing process better.

To satisfy these needs, Inogic lab have come up with a link which has been deployed at a number of customer sites and we have now packaged it and would like to announce the release of version 3.0 of the integration having the following features:

Customer Synchronization: Accounts of Dynamics CRM and Customers of QuickBooks are completely synchronized. You can save an Account in Dynamics CRM and promote it to QuickBooks. Vice versa, you can synchronize customers from QuickBooks applications to view and edit it in Dynamics CRM. Any edit and update on the Dynamics CRM side reflects in QuickBooks in the real time.

Invoices and Orders Viewing in Dynamics CRM: Complete view of a particular customers Invoice and Orders history from QuickBooks in Dynamics CRM within the Account form.

Promote Orders from Dynamics CRM: This feature is extremely useful for Sales people to make Orders against opportunities in CRM and then promote it to Quick Books for further processing.

Quick Customer Account Information: Various financial important data like Credit Limit, Aging, and Terms etc from the Quick Books is available against the Dynamics CRM customer for viewing by Sales People.

Versions supported:
QuickBooks:
Enterprise 8.0 US/UK Edition

Microsoft Dynamics CRM: 4.0 On-premise (IFD not supported), Partner Hosted and CRM Live.

The challenge for integration between QB and Dynamics was the inherent difference in the SDK and databases and having a detailed knowledge of the accounting system as well as CRM system. It is not easy to code and develop an integration which takes care of deduplication, checks out the security rights and also takes into account that accounting compliance are maintained. You also need to have a knowledge of QB SDK as well as be confident about the financial aspects of the system as Order Entry process needs to be duplicated in the integration. If you require more information with regards to QB and would like to pick our brains in terms of integration with any other accounting package which you are attempting, please be free to email us and we will be more than willing to discuss our experience with the same.

Thursday, March 5, 2009

How to Login to various CRM deployments

CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM.

On Premise CRM connection:

On premise uses AD for authentication.

CrmService service = new CrmService();

service.Url = "http://" + servername + "/mscrmservices/2007/crmservice.asmx";

service.CrmAuthenticationTokenValue.OrganizationName = "orgname";

service.CrmAuthenticationTokenValue.AuthenticationType = 0;

service.Credentials = new System.Net.NetworkCredential("username", "Password", "DomainName");

OR

crmService.Credentials = System.Net.CredentialCache.DefaultCredentials;


Live CRM connection:

CRM Live uses Passport authentication. It requires a reference to the Idcrlwrapper be added. The Idcrlwrapper is available along with the SDK as helper files.

Make sure you have copied the msidcrl40.dll to the system32 folder before you try to run this code.

CrmDiscoveryService discoveryService = new CrmDiscoveryService();
discoveryService.Url = "https://dev.crm.dynamics.com/MSCRMServices/2007/Passport/CrmDiscoveryService.asmx";

RetrievePolicyRequest policyRequest = new RetrievePolicyRequest();

RetrievePolicyResponse policyResponse = (RetrievePolicyResponse)discoveryService.Execute(policyRequest);

// Retrieve a Windows Live ticket from the Live
service.LogonManager lm = new LogonManager();

string passportTicket = lm.Logon("LiveWindowsUserId", "password", "crm.dynamics.com", policyResponse.Policy, "Production");

RetrieveCrmTicketRequest crmTicketRequest = new RetrieveCrmTicketRequest();

crmTicketRequest.OrganizationName = "OrganizationName";

crmTicketRequest.PassportTicket = passportTicket;

RetrieveCrmTicketResponse crmTicketResponse = (RetrieveCrmTicketResponse)discoveryService.Execute(crmTicketRequest);

CrmAuthenticationToken token = new CrmAuthenticationToken();

token.AuthenticationType = 1;

token.CrmTicket = crmTicketResponse.CrmTicket;

token.OrganizationName = crmTicketResponse.OrganizationDetail.OrganizationName;

Now, once you have the token assign it to the crmservice object as we do in on premise.

Hosted CRM connection:

This uses SPLA authentication. You need to use the userid and password provided to you by your hosting provider. You would also need to get the discovery URL from them.

From the discovery service URL you can retrieve the list of organizations.

RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();

orgRequest.UserId = username;

orgRequest.Password = password;

RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);

//Find the desired organization with which you want to connect.
//Retrieve the ticket.

RetrieveCrmTicketRequest ticketRequest = new RetrieveCrmTicketRequest();

ticketRequest.OrganizationName = organization;

ticketRequest.UserId = username;

ticketRequest.Password = password;

RetrieveCrmTicketResponse ticketResponse = (RetrieveCrmTicketResponse)disco.Execute(ticketRequest);

//Create the CrmService Web service proxy.
CrmAuthenticationToken sdktoken = new CrmAuthenticationToken();

sdktoken.AuthenticationType = 2;

sdktoken.OrganizationName = organization;

sdktoken.CrmTicket = ticketResponse.CrmTicket;

Now, once you have the token assign it to the crmservice object as we do in on premise.