serving the solutions day and night

Pages

Showing posts with label crm_int. Show all posts
Showing posts with label crm_int. Show all posts

Wednesday, September 11, 2013

MS Dynamics CRM Web Services 2011

MS Dynamics CRM 2011 provides two Web services. These services can be used to identify your organization and to access MS Dynamics CRM data.

IDiscoveryService Web Service - A single MS Dynamics CRM installation can host multiple organizations on multiple servers. The IDiscoveryService Web service returns a list of organizations that the specified user belongs to and the URL endpoint address for each organization.
http[s]://< hostname[:port]>/XRMServices/2011/Discovery.svc

To access the IDiscoveryService Web service, use Microsoft.Xrm.Sdk.dll assembly -> Microsoft.Xrm.Sdk.Discovery namespace.
Use the Execute method to execute a discovery service message.
RetrieveOrganizationRequest - Retrieves information about a single organization.
RetrieveOrganizationsRequest - Retrieves information about all organizations to which the user belongs.
RetrieveOrganizationsResponse

IOrganizationService Web Service - The Web service for accessing data and metadata in MS Dynamics CRM 2011
Organization Service Methods - Create, Retrieve, RetrieveMultiple, Update, Delete, Associate ( create a link between two records), Disassociate, Execute

IOrganizationService Entities

Best Practices for Developing with Microsoft Dynamics CRM

Tuesday, September 10, 2013

Programming Models for MS Dynamics CRM 2011


Key programmability scenarios for MS Dynamics CRM 2011



Early-bound – MS Dynamics CRM 2011 uses an entity data model and Windows Communication Foundation (WCF) Data Services technologies to provide a new set of tools that interact with Microsoft Dynamics CRM. For example: an organization service context that tracks changes to objects and supports .NET Language-Integrated Query (LINQ) queries to retrieve data from MS Dynamics CRM. Early bound classes generated directly from the metadata, which include all customizations.
CrmSvcUtil.exe - CRM Dynamics 2011 Code Generation Tool


Improve PrincipalObjectAccess (POA) and AsyncoperationBase table performance in MS Dynamics CRM 2011

PrincipalObjectAccess (POA) table

Grant permission for a user to see/edit/delete a record in CRM.

Permissions are granted is through either Direct or Inherited shares. 

Direct Shares are the user shares a record to another user or team through the 'share' button in the ribbon. These records will have a value in the AccessRightsMask colum of the POA table.

Inherited Shares are the result of a number of different configuration rules – such as the shares that cascade to an object based on the ownership of its parent record, Custom code that shares a record, or by the system due to relationship behaviors or system settings. These records will have a value in the InheritedAccessRightsMask colum of the POA table.

The shares granted on objects in CRM are stored in the PrincipalObjectAccess (POA) system table. Since almost every access to CRM data interacts with the POA table.

Friday, August 30, 2013

MS Dynamics CRM 2011 - EnableRule, ValueRule, OrRule & CustomRule in Ribbon Customizations

ValueRule - Enable the Custom button only when a specific filed on the form has a value.
For example, if the 'Email' field has value then the custom will be enable otherwise it will disable.

/RibbonDiffXml/RuleDefinitions/EnableRules/EnableRule/

<EnableRule Id="DNS.contact.form.EmailValue.EnableRule">
    <ValueRule Field="email" Value="null" InvertResult="true"/>
</EnableRule>

EnableRule for mulitple fields, use 'OrRule', for example

<EnableRule Id="DNS.contact.form.EmailValue.EnableRule">
    <OrRule>
        <Or>
            <ValueRule Field="email" Value="null" InvertResult="true"/>
        </Or>
        <Or>
              <ValueRule Field="leadsourcecode" Value="810520005"/>
        </Or>
    </OrRule>
</EnableRule>
           
EnableRule only works with Equal(=) condition, for different conditions (not equal) use 'InvertResult' attribute.

Refer the above id in the following location /RibbonDiffXml/CommandDefinitions/CommandDefinition/EnableRules

<EnableRule Id="Sample.account.form.CheckFaxValue.EnableRule"/>

CustomRule - call a javascript function based on the result.

<EnableRule Id="DNS.contact.form.EmailValue.EnableRule">
  <CustomRule FunctionName="DisableReportButton" Library="$webresource:dns_JavaScript/reports.js" Default="true" />
</EnableRule>

http://msdn.microsoft.com/en-us/library/gg334317.aspx
http://msdn.microsoft.com/en-us/library/gg328073.aspx
http://msdn.microsoft.com/en-us/library/gg309433.aspx

Wednesday, May 29, 2013

Import Dynamics CRM 2011 Organization Service SOAP Protocol into BizTalk Server 2010

Import Dynamics CRM 2011 Organization Service SOAP Protocol to BizTalk Server 2010

1)Open Visual Studio 2010, Select File menu -> New -> Project -> 'Empty BizTalk Server Project'

2)Right click the project, Select Add menu -> 'Add Generated Items...'
 
3)Select 'Consume WCF Service', press 'Add' button

Tuesday, May 7, 2013

Dynamics CRM Workflow

Dynamics CRM Workflow
Typical workflow actions include sending an email message, creating a task, and updating a data field on a record.
Dynamics CRM workflow uses the Windows Workflow Foundation framework for its core infrastructure.
Dynamics CRM workflow is Asynchronous Processing Service.
Dynamics CRM workflow processes in one of three ways: Manually by the user, Automatically from a trigger event & From another workflow
Workflow Process Security - Creating and editing workflow processes & Running workflow processes (Manual or Automatic).
Settings -> Process Center -> Processes

Create a workflow process
Enter a process name, select entity, select Workflow as the category and select new bank process, Press OK


Friday, May 3, 2013

Differences between Dynamics CRM Workflows and Dialogs and Plug-ins

Differences between Dynamics CRM Workflows and Dialogs
WorkflowsDialogs
Can be either started by a user or can be automated.Must be started by a user.
Asynchronous processes, and no user input. background process.Synchronous processes, require user input, a wizard-like interface will popup
Triggers are supported for workflowsTriggers are not supported for dialogs.


Differences between Workflows and Plug-ins
Plug-in Workflow
Executes immediately before or after the core operation (synchronous).Can also be queued to execute after the core operation (asynchronous). Queued to execute after the core operation (always asynchronous).
Synchronous plug-ins can increase the platform’s response time because they are part of the main platform processing. Asynchronous plug-ins have less impact on server response time because the code is run in a different process. Less impact on server response time because the code is run in a different process.
To register a plug-in with the platform requires a System Admin or System Customizer security role and membership in the Deployment Administrator group. Users can interactively create workflows in the Web application. However, to register a custom workflow activity, the deploying user must have the same security roles as those required for registering plug-ins.
A plug-in registered for synchronous or asynchronous execution is restricted to complete its execution within a 2 minute time limit. Works well for either short or long processes.
Both online and offline are supported. Works when the Microsoft Dynamics CRM for Outlook client is offline Workflows do not execute when offline.
Plug-ins execute to completion. Plug-ins must be written to be stateless where no in-memory data is persisted. Workflows can be paused, postponed, canceled, and resumed through SDK calls or by the user through the Web application. The state of the workflow is automatically saved before it is paused or postponed.
Plug-ins can perform data operations on behalf of another system user. Workflows cannot use impersonation.


Differences between Background(Asynronous) VS Run-time Workflow
Real Time Workflow:
1. An RTW triggered on a particular event (e.g. Create, Update, Assign and Delete) can also be configured to run on demand. This will still run immediately once triggered rather than being queued to run at later point of time as an asynchronous workflow would.

2. Unlike an async workflow, when a real time workflow runs it can do so in the context of the workflow owner, or can be configured based on user who made changes to record.

3. RTW do not contain any delay or wait activities step.

4. CRM users must have organizational permission on the following two security levels to create and activate a real time workflow:

CRM provides an option to convert existing asynchronous workflows into real time workflows without the need to define any manual steps & vice-versa...

Asynchronous Workflow:
Asynchronous workflows do remain an important option for carrying out high volumes of processes which aren't time critical, for example creating activities or sending emails. In these examples the operation will take place without halting the user process.

Sunday, April 28, 2013

Dynamics CRM Application Navigation Using Site Map

The site map is xml included in a solution’s customizations file. Create a solution specifically for site map and application ribbon changes.
<SiteMap>
    <SiteMap>
        <Area>
            <Group>
                <SubArea/>
                    <Privilege/>
                </SubArea>   
            </Group>
        </Area>
    </SiteMap>
</SiteMap>

Use XML Notepad 2007 to edit XML

The default site map that you export does not include any of the following elements: Title, Titles, Description, or Descriptions.  Dynamics CRM doesn’t require these elements for the six default application areas, but they are required for new areas.  The Title, Titles, Description, and Descriptions elements apply to the Area, Group, and SubArea elements.

The Descriptions elements appear only in the Outlook client; the Titles elements appear in both the web and Outlook clients.

http://<crmserver>/<organizationname>/tools/solution/import/SolutionImportWizard.aspx.

Always export the latest site map and create a backup copy before making any edits.

Entity Display Areas


Thursday, April 25, 2013

Data Transfer From SQL Server to CRM 2011 using CozyRoc SSIS+

1)Open Sql Server Data Tools
2)Create New Integration Services Project
3)Right Click Connection Manager -> Select New Connection Manager
    Select OLEDB Type
    Select Exiting Data Connection or Create new connection
    Rename 'DNS_DB.conmgr' (DNS sql database connection)
   

Wednesday, April 17, 2013

CRM Plugin Code - Add/Update Entity, Connect WebService, Update Database

//Update Same Entity, Other entity, create new record in other entity  and connect to WebService
//Update to database  and
//Webservice update to database

using System;
using System.Diagnostics;
using System.Linq;
using Microsoft.Xrm.Sdk;

using Microsoft.Xrm.Sdk.Query;
using System.Xml;
using System.Net;
using GCEntity = CRMEnt.Entities;
using System.Text;
using System.ServiceModel;

Saturday, January 19, 2013

MS Dynamics Entity Relationship

An entity relationship in Microsoft Dynamics CRM defines how two entities interact with each other.
Microsoft Dynamics CRM uses three types of data relationships, which we review in more detail in the following sections:
Hierarchical Relationships - 1:N and N:1

One-to-many (1:N) - relationship between two entities in which a single entity can possess multiple (many) related entities. For Example, Each Account can have many Contacts, but you can assign only one Account to each Contact.

Many-to-one (N:1)

Thursday, December 27, 2012

Microsoft Dynamics CRM 2011 Security Model

Microsoft Dynamics CRM 4.0 Security Model
  • Supports a licensing model for users.
  • Provides users with access only to the information that they require to do their jobs
  • Categorizes types of users by role and restrict access based on those roles.
  • Prevents users from accessing objects that they do not own or share.
  • Supports data sharing by providing the ability to grant users with access to objects that they do not own to participate in a specified collaborative effort.
Download Security Model

Create a rough model of your company’s current operational structure. For each section of your organizational layout, you should identify the approximate number of users and the types of business functions those users perform. This rough organizational map to start planning how you want to set up and configure security in your Dynamics CRM deployment.


Tuesday, November 27, 2012

CRM Dynamics 2011 - Dynamic Entity using Service Data Context

Refer the blog, how to create CRM Entites and Service Data Context http://makdns.blogspot.com/2012/11/crmsvcutilexe-crm-dynamics-2011-code.html

Add the CRM.Entities.cs file to your project.

Insert, Update, Delete, View and Select Entities list using c#.