Wednesday, May 18, 2011

Tips 'n' Tricks - MSCRM 2011

Dynamics CRM 2011: DL Configuration

Following are the Configuration Steps:

1. Add a Mailbox to the DL

2. Customize the QUEUE entity and add a custom Email Field on the form

3. Add the Mailbox EMAIL ID in the Email Field and DL in the Custom field.

4. Inbound should be Email Router.

5. Configure the Step1 mailbox in EmailRouter.

Mechanism: Any Email to DL will be sent to Mailbox(which is added in the DL),Email Router will process into CRM and if TO address matches the DL name then it will be sent to respective QUEUE.

Dynamics CRM 2011: Accessing Sub-Grid controls from form Javascript:

If CRM form has multiple Sub-grids and there is a requirement for some scripting to show/hide Sub-grid control, Place your sub-grids in different sections and show/Hide sections instead of controls. Since RTM version has a limitation to access all the sub-grid controls on the form through Scripting and this behavior is in-consistent.

Dynamics CRM 2011: Restrict Access to a field

1. Create a field security profile.

2. Associate users or teams with the profile.

3. Add specific field permissions, such as Create, Update or Read to the profile.

Dynamics CRM 2011: Size Limitations for Web Resource

The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property. This property is set in the E-mail tab of the System Settings in the application. This setting affects more than just e-mail attachments. This setting will also limit the size of files that can be attached to notes and Web resources. The default setting is 5MB.

Dynamics CRM 2011: Edit Attribute Properties in Bulk

CRM 2011 facilitates to modify Attribute properties in Bulk from 'Field' list view of Entity.

We can update Requirement Level,Searchable and Audit Options in Bulk.Particularly this option will help alot when Audit is enabled at Entity level, since audit will get enabled for all fields by default. We can choose this option to Set/Reset Audit at attribute level.

Dynamics CRM 2011: Considerations for Code Upgrade

Followng are considerations for Code Upgrade from CRM 4.0 to Dynamics CRM 2011:

New Authentication Scheme: Supports claims-based authentication and Active Directory authentication

New Types: Supports use of native .NET types whenever possible. For example, the type CrmBoolean used in MSCRM 4.0 is now of type bool or System.Boolean.

New Entity Class:Use the Entity class to work with entities instead of the DynamicEntity class.This lets you use late binding so that you can work with types

Use WCF Data Services Instead of ASMX Files

Use the Consolidated and Expanded Query Methods:There are now three different types of queries you can use, depending on the best choice for your scenario.QueryExpression, FetchExpression and LINQ

Use New Error Handling: In WCF terms, exceptions returned from the channel are called faults.

for e.g. FaultException(Microsoft.Xrm.Sdk.OrganizationServiceFault)

Dynamics CRM2011: Number of records in a list (5000+) indication

We can configure the count of records value shown in the grid at the bottom.

In order todo this, we need to modify the TotalRecordCountLimit setting in the DeploymentProperties table of MSCRM_CONFIG database as below.

UPDATE DeploymentProperties

SET IntColumn = 'Reqd.Value'

WHERE ColumnName = 'TotalRecordCountLimit'

- Then do IISREST in the web server

- Note: This is applicable to all organizations in the server

Dynamics CRM 2011: Ribbon Area

The form editor does not let you customize the ribbon area. The ribbon controls displayed for a specific form are defined in three layers:

All Entities: An entity template defines a default set of form ribbon controls for all entities. This is the ribbon you will see in a new custom entity where the ribbon hasn’t been modified.

Per Entity: Changes to the default form ribbon definition can be defined for an entity that will appear in all forms for that entity.

Per Form: An individual form can contain changes to the default entity form ribbon definition in the RibbonDiffXml (FormXML) element.

Note:While the ribbon provides capabilities to retrieve data from a form or grid, the only capability to interact with the ribbon using form scripting is the Xrm.Page.ui.refreshRibbon method.

Dynamics CRM 2011: Debug a Sandboxed Plug-in

The sandbox host process monitors the sandbox worker process which is executing the plug-in. The host process checks if the plug-in stops responding, if it is exceeding memory thresholds, and more. If the worker process doesn't respond for than 30 seconds, it will be shutdown. In order to debug a sandbox plug-in, you must disable this shutdown feature. To disable the shutdown feature, set the following registry key to 1 (DWORD)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\SandboxDebugPlugins

Dynamics CRM 2011: Remove unused "using" statement in VS2010

Most of the times in our code there will be using statements which are unused.

To remove these unused using statements, do the below.

Go to Visual Studio 2010 ->Open .cs file -> Right click -> select Organize Usings -> Remove Unused Usings

Dynamics CRM 2011: Update existing data using Data Import Tool

With CRM 2011, In order to update existing data, we can Export data to Excel and check the tiny box at the bottom to enable for re-import. It stores the GUID in a hidden column and upon re-import, updates the original data.

Dynamics CRM 2011: Javascript Global Context

When creating htm pages as webresources in 2011 there are many times you would want to get information about CRM such as the orgname and server url. This is where the ClientGlobalContext comes in to play.

""

Remember that if the web resource name has a folder name(s) before it you must include preceding "../" in front of the script name.By adding this reference into your htm file you will now have access to several javascript functions like getAuthenticationHeader,getOrgUniqueName,getUserId and getUserRoles etc.,

Dynamics CRM 2011: Dialog-Related Activities

In Microsoft Dynamics CRM 2011 , some new activities are introduced for the dialogs. These activities are available as steps in the Microsoft Dynamics CRM Process Designer.

Query CRM Data: Enables you to define query variables that can be used to query Microsoft Dynamics CRM data.

Assign Value: Enables you to perform simple arithmetic (increment, decrement, and multiply) and string (append) operations on the variables and input arguments in dialogs.

Link Child Dialog: You can specify a dialog as a child dialog, and invoke it from within another dialog (parent) by using the Link Child Dialog step in the parent dialog.

Stop Dialog: Enables you to end a dialog at a particular stage in the dialog flow.

No comments:

Post a Comment