• About

Information Dynamics

Information Dynamics

Monthly Archives: July 2014

Querying CRM Data

30 Wednesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

The following are the different ways of querying CRM data:

  • Fetch XML supports aggregates and grouping
  • LINQ to query CRM data no support for aggregates and grouping.

 A Sample code querying an entity name Airport in Dyanmics CRM 2011

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.ServiceModel.Description;
using System.Net;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk;
namespace CRMDataQuery
{
class Program
{
static void Main(string[] args)
{
//Establish connection to the web serivce end point

Uri orgUri = new Uri(“http://crm:5555/ACM/XRMServices/2011/Organization.svc”);
Uri homerealUri = null;

ClientCredentials credentials = new ClientCredentials();
credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
try
{
//Instantiate a new instance of CRM OrgranizationServiceProxy class
using (OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(orgUri, homerealUri, credentials, null))
{
//Ensure support for early-bound types
serviceProxy.EnableProxyTypes();

IOrganizationService service = (IOrganizationService)serviceProxy;

//Create the Context object that will provide IQuerable Collection

OrganizationServiceContext context = new OrganizationServiceContext(service);

var airports = (from f in
context.CreateQuery<acm_airport>()
select new
{
AirportCode = f.acm_name,
AirportName = f.acm_AirportName
});
foreach (var airport in airports)
{
Console.WriteLine(“====================== Airport Information ===================”);
Console.WriteLine(“AirportCode: {0}”, airport.AirportCode);
Console.WriteLine(Environment.NewLine);
Console.WriteLine(“AirportName: {0}”, airport.AirportName);
}
}
}
catch (Exception ex)
{
throw ex;
}
Console.ReadLine();
}
}
}

Table Creation in CRM 2011 Database

25 Friday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

All the custom entities created within the Organization in Dynamics 2011 platform will be in [Org Name]_MSCRM database. The following are the table types created:

  • For custom entities there will [entityname]+Base and [entityname]+ExtensionBase tables
  • For custom entities created as an activity entity there will be [entityname]+Base table created.

 

 

EntityTables

 

Custom Entity: Custom entities basically represent business entities.

Custom Entitiy as Activities (aka Activity Entities): They represent the tasks a user or team performs. The table in the article summarizes the differences between Custom Entity and Activity.

Server-Side Programming

22 Tuesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

Dynamics CRM 2011 provides event-driven server side programming model. This facilitates creation of Plug-ins and Processes (aka Workflows). To use CRM Entity information within custom code the Dynamics CRM 2011 platform exposes web services. The options available to use CRM data include use of SDK assembilies (preferred approach) or Service references.

There are two major Web Services exposed by Dynamics CRM 2011 viz., IOrganizationService and IDiscoveryService

To view the service URL’s go to Settings > Customization > Developer Resources

ServiceURLs

 IOrganizationService:  Provides a set methods to perform operations on system and custom entities. The methods include:

  • Create,Retrieve (aka Read), Update, Delete
  • Associate: To create a link between two records that participate in a relationship
  • Disassociate: To delete the link between two records.

IDiscoveryService: Useful in multi-tenant environments to get the organization information that a user belongs to. It provides a single method (Execute). The Execute method implements a Request/Response message exchange pattern. The base class for Request is DiscoveryRequest and the base class for Response is DiscoveryResponse.

Example: RetrieveOrganizationResponse Execute(RetrieveOrganizationRequest request)

For interacting with the CRM entities Dynamics 2011 platform supports Early-Bound and Late-Bound programming types.

  • Early-Binding: Strong type-support and references are checked at compile time. CrmSvcUtil.exe is used to generate the early-bound classes so they can be utilized in the custom code.

Example: [org]_[customentity] myentity = new [org]_[customentity] ();

  myentitiy.Field = “Value”;

  • Late-Binding: Typically used when we have to work with unknown entities / attributes. Entity class is used which is the base class for all types of entities.

Example: Entity myEntity = new Entity(“CustomEntity”);

                    myEntity[“FielName”] = “Value”;       

Client-Side Programming

21 Monday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

CRM 2011 provides the following new capabilities for client side interactions:

  • New object model for programming
  • Support for multiple forms per entity, ability to show/hide UI elements
  • Introduction of new file depository called Web Resources.

Typical tasks performed using client-side programming include data validation, automation and process enhancement. Web Resources is the file depository that holds all the instructions for achieving these tasks.

Web Resources: It provides a way to store the files in Dynamics CRM database. Every item stored can be retrieved/accessed by URL address. The Web Resources are stored in the solution and hence can be exported and installed on any Dynamics CRM Deployment. Dynamics CRM 2011 supports 10 file formats and they are listed in the Type drop down while adding a Web Resource.

WebResources

WebResoourceAdd

 It is a good practice to organize web resources in a folder structure so that they can be easily identified and managed. As an example all the Script files can be under “/scripts/”,  Images can be under “/images/” and so on.

WebResourcesCreating

Dynamics CRM 2011 performs client side validation to ensure that Upload File matches the Type selected. As in example below a client side validation is triggered for mismatched file type.

WebResourcesSaveValidation

The URL field is populated once validation checks pass.

WebResourcesSave

To access Web Resources from Default Solution go to Settings > Customizations and then click on Customize the System

WebResourcesDefaultSolutions

Plug-in Registration Tool Dynamics CRM 2011

18 Friday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

The Plug-in registration tool is used register the custom code into the Dynamics CRM 2011 system.

What is a Plug-in: A custom code written to implement business logic targeted at modifying the behavior of the system. They are event handlers and execute in response to particular events being fired by the platform. A Custom workflow activity written is also a plug-in that needs to be registered in CRM system.

Registering a custom workflow activity with Microsoft Dynamics CRM Online is not supported by any means.

The Plug-in tool can be found here the executable is part of the CRM 2011 SDK and is called pluginregistration.exe

PluginRegistrationTool

 

The First step is to create a connection, Click on the Create New Connection enter the Discover URL information. The end points for services available with CRM 2011 can be viewed by going to Customizations > Developer Resources.

ServiceURLs

 

Once connection is established the list of organizations are displayed:

 

 

Infrastructure Design / Deployment Options

17 Thursday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

Microsoft Dynamics CRM 2001 provides three deployment options:

  • On-premise: Organizations deploy Dynamics CRM in its own data center. If any users external to the organization need to access CRM then it needs to be configured for  internet-facing deployment (IFD)
  • Partner-hosted: Hosting partner will deploy Dyanmics CRM in their data center. IFD configuration is required for customer access.
  • Online: Microsoft hosts Dynamics CRM in their own data center.

The following table summarizes the difference(s) in available features in On-premise and Online deployment scenarios:

CRMOnpremiseVsOnline

The Development life cycle of Dynamics CRM in an organization consists of configuring and customizing the CRM as new requirements come in from various business areas. Three CRM deployments will be ideal for Development, UAT and Production. The Infrastructure scenarios include:

Single Server Environment:

SingleServerDeployment

Multiple Server Environment:

MultipleServer

 

 

 

 

Getting Data into Dynamics CRM

15 Tuesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

Any Organization wanting to implement Dynamics CRM will almost certainly be using pre-existing data. So one of the important things to consider will be Data Migration and Data Integration. As applied to traditional Windows / Web projects the tasks that can be identified are, those who have worked with SQL Server extensively would be familiar with the approach listed below.

  • Choice of tool(s)
  • Source Data Analysis
  • Mapping Document and Integration Scripts
  • Perform Data Transfer.

The following link has a very good explanation in this area:

http://crmbook.powerobjects.com/system-administration/data-migration-and-integration/

 

 

Auto-Numbering

15 Tuesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

The out-of-the-box Auto-Numbering feature in Dynamics CRM provides auto-numbering for the following entities:

  • Contracts
  • Cases
  • Articles
  • Quotes
  • Orders
  • Invoices
  • Campaigns

The format for auto-numbering is [prefix]-[number]-[suffix] example CNR-1001-AB7DC4

AutoNumbering

The limitation with OOB feature for auto-numbering is that it cannot be applied to custom entities.

The feature can be accessed by going into System > Administration > Auto Numbering

Multiple Language Support

15 Tuesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

The installation media for Dynamics CRM sets the base language for user interface and help. For supporting other languages appropriate language packs need to be installed.

MultilanguageSupport

 

CRM 2011 Administration

15 Tuesday Jul 2014

Posted by GIRISH SRINIVASA in CRM 2011

≈ Leave a comment

Varying configuration options can be applied in Dynamics CRM at the user and organization level. Configuration changes target two things:

  • Change the way information is displayed
  • Change the way application operates

AdministrationSystemSettings

Few Important things about various tabs:

  • Format:  Deals with how Dynamics CRM displays number, currency, time and date for the users
  • Auditing: Provides the option to enable auditing at the Organization level

A user can change the default settings applied at the organization level by going to File > Options and set personal options

AdministrationSetPersonalOptions

← Older posts

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2021
  • August 2021
  • July 2021
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • March 2019
  • September 2018
  • February 2018
  • January 2018
  • December 2017
  • January 2017
  • August 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014

Categories

  • ADCS
  • ADFS
  • ADFS 4.0
  • ASP.NET Core
  • Azure
  • Azure AD
  • Azure AD DS
  • Azure B2C
  • CRM 2011
  • CRM2013
  • CRM2015
  • CRM2016
  • Docker
  • Dynamics 365
  • Dynamics 365 CE Online
  • Dynamics 365 Portals
  • Dynamics CE 9
  • Knockout and TypeScript
  • OAuth2.0/OpenIDConnect
  • Power Platform
  • PowerApps
  • PowerShell
  • SharePoint 2019
  • Spkl
  • Uncategorized
  • WebAPI
  • Windows Server 2012
  • Windows Server 2016

Meta

  • Register
  • Log in

Blog at WordPress.com.

  • Follow Following
    • Information Dynamics
    • Already have a WordPress.com account? Log in now.
    • Information Dynamics
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...