Archives / 2015 / July
  • Actions in Microsoft Dynamics CRM 2013

    • Actions are introduced in MSCRM 2013.
    • Actions are the messages that can be defined for an entity.
    • Out-of-box CRM provides a set of pre-defined messages for each entity like create, update, delete and others.
    • Example for custom action would be approved; reject, delegate or any other that fits the business criteria.
    • Through actions, we can create our own messages for any entity type


    Here is an example for Action for all entities:

    • Microsoft Dynamics CRM 2013 provides an option to create a Global Action. This can be created by selecting the entity name as None (global), as shown below.
    • This can be useful for all the entities when we are using the same action for all entities.




    Here is an example of Action for specific entity

    • Navigation for the action is settings à process
    • Select the category as action and entity from the drop down list.




    An action screen will be displayed as shown below.

    Enable Roll back: There may be cases when you have a code which runs out of the scope for CRM and you may not be able to roll back the action. The option of rolling back can be disabled for each action.

    Direction: You can set either the Argument as an input or Output Argument to an action, by using direction.

    Type: Below are the available types of arguments.


    • To create input and output parameter click on clip_image001 icon.



    • To enter output parameters selects the option as output and enter the details.



    • Once the input and output parameters are set you can write the logic which is same as workflows.
    • Input and output parameters are not necessary for every action. This has to define based on the requirement.



    • Now the logic is defined for the action, you just need to activate it. Now this action is available for the developers and they can easily call this action from a custom code whenever it is required.



    • The advantage of actions is to provide the ability to modify the logic easily whenever a business process is changed. A business user can modify this without the help of a developer.
    • Although you won’t be able to run the actions without a custom code, they are helpful when there is frequent change in the process. Actions can be run by a plugin, a custom workflow, or while doing integration with another system, a custom client application, or JavaScript.
  • Automatic Lead assignment to Sales team

    In general business scenario sales team will deal with the number of persons who visits their web site and a sales coordinator will assign the distribution of leads to sales team. Handling of all web visitors using manual process is very hectic and we may miss some leads to contact them.

    To make this an automation process we have solution for this.

    Follow the below procedure for automation of Lead assignment to sales team

    Step 1Download the solution from here.

    Step 2: Navigation for importing the solution is Microsoft Dynamics CRM à settings à solutions à import

    Step 3: Click on Next until it imports successfully.


    • On creation of Lead a Lead number will be generated automatically. Then refresh the form.
    • For this we have written a custom workflow which fires on the creation of Lead.




    • Based on this Lead number will do some internal logic calculate with total number of sales person and assigns these sales person to that Lead as a owner.
    • There will be ‘n’ number of sales persons will be there. Based on the Lead number these sales persons will be allotted as a owner to different leads.




    This solution will reduce the burden on the sale coordinator. Whenever leads will get created then it will assign to the sales team as owner. So, for the Lead the particular sales person will be responsible so in this way sales will be more traceable and easily manageable.

  • Configuring Outlook throws exception

    I was trying to configure outlook today morning and found following error messages


    Error| Exception : |NativeError:61b8 HResult 80040e2f Message: A duplicate value cannot be inserted into a unique index. [ Table name = MetadataSchema.EntityClientStatistics,Constraint name = PK__MetadataSchema.EntityClientStatistics__00000000000007A9 ]|    at Microsoft.Crm.Application.SMWrappers.CrmSqlCeCommand.ExecuteCommandWithRetry[TResult](Func`1 body, Int32 retryCount) at Microsoft.Crm.Application.SMWrappers.CrmSqlCeCommand.ExecuteNonQuery()

    Resolution for this

    Uninstalling plugin profiler solution helped me to configure my outlook client.

  • Sandbox instances for Online CRM

    The sandbox instance are introduced for Microsoft Dynamics CRM 2013 as a non production environment or test instance.

    You can easily differentiate the sandbox environment from the Production environment using Navigation bar

    Production instance will have a blue color where as sandbox instance will have orange color with a SANDBOX watermark.

    The Prerequisite for doing sandbox environment is office 365 Portal user should have  Administrator role.

    Creation of Sandbox environment:

    • Browse to the Office 365 admin center and sign in using Office 365 Global administrator or CRM System Administrator credentials.

    • Choose Admin > CRM.


    • Choose the instance tab.
    • select the instance and click on copy option.




    • Source instance will be the selected instance and it will ask for target instance which is a sandbox environment.
    • Select the target instance from the drop down list.
    • There are two types of Copy options are available.


      • Full Copy
      • Minimal Copy


    Full Copy

    Copy the full application database from the source to the target.  This make an exact copy of the source instance, including all application data, users, customizations, etc.  You’ll need to make sure you have enough available storage space to copy before you copy the instance.

    Minimal Copy

    Copy only the customizations, core configuration data, and users from the source to the target.  This is primarily useful for development scenarios when the full production database is not needed.  You will need to import your custom configuration and sample data to complete the process.

    • When you select the target instance and copy option then only other fields will be in editable other wise they will be in read only
    • Enter the general settings.
    • Enter the name for the sandbox environment
    • Enter the URL.
    • Purpose for making sandbox environment.
    • Instance type will be sandbox.
    • select the security role for the sandbox environment.
    • Finally click on Copy.




    • This will take few minutes to prepare the sandbox environment.
    • The status will be shown in the instance area,
    • Once sandbox environment is ready you can able to see the open option in editable and navigation bar in orange color with sandbox watermark.



  • Getting started with Ribbon Workbench

    Ribbon Workbench for MSCRM 2011/2013/2015:

    • The Ribbon Workbench for CRM is a tool written to make customizing the Ribbon easier and quicker.
    • The Ribbon is the user interface element that appears at the top of all recent Microsoft Applications, and was the successor to the old ‘toolbar’.
    • Rather than have a single toolbar that was full of all command buttons and a set of drop down menus that could be multiple layers deep.
    • The Ribbon attempts to show only the commands that you need depending on the task that you are doing. The ribbon also attempts to scale to the available window width, making some less important commands smaller or even move them to drop down menus when the space is limited.
    • The ribbon designer decides on the importance of each command and therefore the order in which commands are ‘demoted’ as the window width is reduced.
    • The ribbon work bench was written to provide a ‘drag and drop’ developer experience that allows all customization scenarios to give complete control over your CRM ribbon & command bar.


    Installing the Work Bench:

    Download the Ribbon workbench solution from here.

    To install this solution Navigate to Settings ---> solutions –> import

    Click on Next until it finishes.

    After imports Ribbon workbench will be displayed on top of the solutions.



    Toolbox, Entities and Solution Elements

    You'll notice the panels shown under the Ribbon Editor Panel. You can select the divider bars between these panels to resize them to the position that suits you best.




    Toolbox Panel- The toolbox allows you to drag and drop ribbon controls on to the ribbon design surface. When you drag an item it must be positioned next to where you would like it to appear. The cursor will change to a blue plus icon when dropping the control is allowed. If you want to place a new tab, you must drag the tab control directly next to an existing tab, rather than drop it where the controls appear.

    Entities Panel - The entities that you included in your solution will appear as a list in the Entities Panel. By selecting an entity, the Ribbon Workbench will show you the tabs that are available for that entity and the currently selected ribbon type

    Solution Elements Panel - This panel is one of the most important areas for understanding your ribbon customizations. As you drop items on the Ribbon Design Surface, Custom Actions will appear in the Solution Elements. Later we will look at what each of these elements mean.


    Process for Ribbon Workbench:

    Click on Ribbon Workbench. This will pop with the below screen. Click on Open solution to load the solution information.

    A pop will open with the list of solutions. Select the solution from the list.

    Then the selected solution will downloads to Ribbon workbench area.



    Now the solution components are added to the Ribbon workbench.

    You can able to add or edit buttons at a form level for all entities or else you can make the changes for a specific entity at form level,sub grid level.



    Adding button to the Ribbon area:


    Drag the button from the toolbox and drop it where ever you want to place it.

    below in the screenshot the button is showing as dragged.



    Setting the Properties for Button:

    After placing you can able to see the button then you can customize this button.

    you can able to add the images as per requirement, Using Ribbon workbench can able to add 16by16 or 32by32 images.

    You can able to give the name for the button in the AltText  and LabelTextButton.

    Then the button name will be edited. 


    Defining a button command:

    Now the button is defined then do some action while clicking on the button. For this you need to write a command.

    Right click on the command. You can able to see Add New.



    Command is created. This will be displayed as drop down in the command tag. Select the command.

    You may be wondering why we are creating a new command when we have already added a button to the ribbon. This is because the Ribbon allows a command to be defined such that it can be used by multiple buttons. So although we are only going to associate our command with the new button, we could add more buttons that all call the same command. Commands use 'Actions' to define what should happen when a user clicks any associated buttons. To define the Actions, click on the magnifying glass icon next to the 'Actions' Property:

    Any existing actions that are defined for this command would display here, but because it is a new command, the list will be empty. Go ahead and click 'Add' to create a new one and select the 'Open Url Action'. The other 'JavaScript Function Action' option is for more complicate actions that involve calling code, but more on this later.

    Now we set the properties of the action:


    Display rules/Enable Rules – you can define the criteria such that you can display or hide the buttons based on criteria.




    Now everything setup, we can publish our solution to make the user interface available to the user. To publish, simply click on the 'Publish Solution' button on the Top Bar.

    The publish may take a span of time depending on how much resources your CRM Server has been allocated, but once finished, you should be able to navigate to form and use the new button.

Please Wait