Saturday, 21 September 2013

Ms Crm 2013 Orion Release



Microsoft will be releasing version 2013 of Dynamics CRM, code-named Orion. A new version means brand new features aimed at improving every aspect of the application.
  1. User Experience
·         Instead of having a permanent navigation pane on the left hand side the new model will appear on top, switch tiles as options are selected and disappear when not used to allow for more screen real estate.
·         Instead of a ribbon with multitude of buttons there is now a command bar with up to 7 items so it is easier to remember. Additional items are exposed from the ellipsis
·         Each module (Sales, Marketing, and Service) has its own home page where each can have its own dashboard.
·         The record form has been redesigned so that all the necessary information is visible or quickly accessible.
·         A new Quick Create function allows you to add relevant related data in a more intuitive fashion.
·         The interface will reformat the layout across window sizes and device types; desktops, tablets and phones. CRM is now cross browser compatible and integrates to Yammer, Skype, Lync and Bing Maps.
·         It has an auto-save feature, global search and in-line grid editing for Opportunity Products.
  1. New Functionality

  • Processes can span entities. One process might include a lead and an opportunity, another might start at the opportunity progress through a quote and go back to the opportunity.
  • Processes can have stages. Rules can be setup so that processes cannot move through stages until all necessary steps are accomplished.
  • Users can switch from one process to another. Flexibility can be created to accommodate any situation because business sometimes doesn’t moves in a straight line. For example, a cross sell opportunity that got put on hold because the customer was being acquired might get revived as a new lead because the new company has to be re-qualified, but we don’t want to lose the history.
  • Stages can be linked to stage categories. Process stages can be assigned to independent stage categories so reports can be created across all processes.
  • Roles can be assigned to processes. Users can be limited to which processes they can follow.
  • An entity can belong to multiple processes. Opportunities can have different stages per process, for example, which was difficult to achieve in prior CRM versions.

  1. Technical Improvements
·         The current CRM Outlook Client design lumped its processes within the Outlook memory stack. The effect has been lower stability and reliability because of high memory use, leaks and fragments
·         The new CRM Outlook client isolates its processes into two separate memory stacks. This way if there are a lot of customizations, and if they happen to leak memory, they won’t affect the overall Outlook experience.
·         One difference between the Outlook Client and the Web Client is since Outlook has the left hand navigation; CRM will continue to use it allowing for more space at the top of the screen.
·         In 2011: Currently synchronizing emails between an email server and the CRM server worked through either Outlook or the CRM email router. Synchronizing though Outlook requires Outlook to be up and running. The Email Router needs to be installed on an on premise server and be administered separately from CRM.
·         CRM 2013 can now synchronize directly to a mail server without the need for Outlook or the Email Router. If the mail server is Microsoft Exchange, emails, tasks, appointments and contacts are synchronized. Other POP3/SMTP mail servers will only sync email. The sync configuration is handled all within CRM which enables it to be used in online deployments. Besides users, email processing can also be configured for CRM queues.
·         Conditional business rules (i.e. make a field read only when another field contains a certain value) up to now had to be implemented with JavaScript. These had to be maintained independently by device. Now a designer allow for quick creation of a wide variety of rules that will work on all devices.
·         Another function that will reduce developer time is the ability to run workflows synchronously and post results back to the form within the same transaction.  This was previously accomplished with JavaScript.  This new capability allows you to run the workflows pre or post change and also either under the calling user security or the workflow owner security.
·         Actions are a new function similar to workflows that can now perform a collection of record changes that depend on variable input or output parameters across steps in the process.  Previously this functionality had to be performed by multiple web service calls.
·       Technical Limitations
  • Tablets are restricted to 75 fields and 10 related entities or 5 tabs within forms. iFrames or Web Resources (except for JavaScript) are not available on tablets.
  • Unsupported CRM 2011 customizations may not work in 2013. HTML DOM manipulations will throw script errors. The CRM 4.0 client API is not supported any longer.

  1. Upgrade Process

Customers on CRM 4.0 must upgrade to CRM 2011 before they can upgrade to CRM 2013.
Unsupported CRM 2011 customizations may not work in 2013. HTML DOM manipulations will throw script errors. The CRM 4.0 client API is not supported any longer.

Wednesday, 11 September 2013

Create a add-in in for outlook 2007 to append a message on create of activity

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
using Microsoft.Office.Interop.Outlook;
using System.Windows;
using System.Windows.Forms;
namespace OutlookAddIn1
{
    public partial class ThisAddIn
    {
        Outlook.Inspectors inspectors;
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            inspectors = this.Application.Inspectors;
            inspectors.NewInspector +=
            new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(Inspectors_NewInspector);
            this.Application.ItemSend += new ApplicationEvents_11_ItemSendEventHandler(saveEmail);

        }

        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }

        #region VSTO generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);

        }

        #endregion
        public void Inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector)
        {
            Outlook.MailItem mailItem = Inspector.CurrentItem as Outlook.MailItem;
            Outlook.TaskItem taskItem = Inspector.CurrentItem as Outlook.TaskItem;
           Outlook.AppointmentItem appItem = Inspector.CurrentItem as Outlook.AppointmentItem;
            DialogResult res = MessageBox.Show("Do you want to create Private Activity ? Press ok  ", "", MessageBoxButtons.OKCancel);


            if (mailItem != null && (res == DialogResult.OK))
            {
                if (mailItem.EntryID == null)
                {
                    mailItem.Subject = "[MNPI ACTIVITY:]";
            

                }

            }
            if (taskItem != null)
            {
                if (taskItem.EntryID == null)
                {

                    taskItem.Subject = "Private Task";

                }

            }
            if (appItem != null)
            {
                if (appItem.EntryID == null)
                {

                    appItem.Subject = "Private Appoinment";

                }

            }


        }

        private void saveEmail(object Item, ref bool Cancel)
        {

        }

    }

}

Sunday, 8 September 2013

Fetch XMl VS Query Expression in Mscrm 2011

When developer want to query in MSCRM 2011 often thinks of Query Expression or Fetch XMl.
A question arises in  developer mind what is the difference and which one is better.
Fetch is a proprietary query language that is used in Microsoft Dynamics CRM. It is based on a schema that describes the capabilities of the language. The FetchXML language supports similar query capabilities as query expression
Using fetch XML one can get in result attribute from related  entity also but not in Query expression. using FetchXML , you can set the Related Entity columns in filter criteria to return the Query Result. FetchXml allows the querying of CRM data using an XML representation.

Querying CRM DB using QueryExpression one cannot able to set Related Entity columns as filter criteria to return the Query Result.

Type of Entity in MSCRM 2011



Types of Entities in CRM:

·         System Entity:System entities are used by Microsoft Dynamics CRM to handle all internal processes, such as workflows and asynchronous jobs. You cannot delete or customize system entities.

·         Business Entity:Business entities are part of the Microsoft Dynamics CRM default installation and they appear in the customization user interface. An account, contact, and letter are examples of business entities

·         Custom Entity: After installation, you can add custom entities to Microsoft Dynamics CRM to address specific business needs of the organization. In a Microsoft Dynamics CRM Solution, you can set business and custom entities and attributes to be either customizable or non-customizable.

Procees to attach the Debugger in MSCRM 2011



Process to attach the debugger while debugging plug-inonline, offline, custom workflow

Plug-in Registration Configuration
Service Process
online
w3wp.exe
offline
Microsoft.Crm.Application.Hoster.exe
asynchronous registered plug-ins (or custom workflow assemblies)
CrmAsyncService.exe
sandbox (isolation mode)
Microsoft.Crm.Sandbox.WorkerProcess.exe

Principal Object Access Table n MSCRM 2011



Principal Object Access Table
POA (principal object access) table is a table for sharing of records. The shared, assigned and re-parented or inherited records are added to this table. Basically if you try to access a record that you do not own the system will check the POA and if the permission is there then you can access the record.
The POA table is used to provide access to specific records for CRM users, and each record in the POA table represents one CRM object that is related to one CRM user. Records created in the POA table come from one of four ways:
• Share reassigned records with original owner: CRM System Settings
 If this is set to Yes, then records would be added to the POA table whenever an assign takes place. These records will have a value in the AccessRightsMask column of the POA table.
• Direct sharing: Actions – Sharing
àWhen users explicitly share a record to another user, a record would be created in the POA table. These records will have a value in the AccessRightsMask column of the POA table.
• Reparent Setting: Relationship Behavior
àEach entity has relationships with other entities (ex. Account to Case). By default, the Reparent option is set to Cascade All. With this setting, sub records would be shared to the owner of the parent record. For example: Let’s say that User1 owns Account1. User2 has access to Account1 and creates a case underneath Account1. With the out of the box Reparent options, a record would be created in the POA table that would give User1 access to the newly created case. These records will have a value in the InheritedAccessRightsMask column of the POA table.
• Indirect Sharing
àWhen sharing occurs through a direct share, assignment, or parenting, if the relationship is set up to cascade the share to child records, additional records will be created in the POA table in order to give proper permissions to the new user for the relevant child records. These records will have a value in the InheritedAccessRightsMask colum of the POA table.

The Reparent setting is what seems to come as a surprise to some customers. Many customers will keep the Reparent setting set to Cascade All. This is a perfectly acceptable setting, but if the majority of your users already have access to the records that are being shared to them through their security role, the records in the POA table may not be providing much of a benefit.

It is possible to change the Reparent setting to Cascade None. In this scenario, records would not be auto-created in the POA table for the owner of the parent record. Building off of the example mentioned above: User1 owns Account1. User2 has access to Account1 and creates a case underneath Account1. With the relationship set to Cascade None, a record would not be created in the POA table for User1.