Visual Studio Solution Starters and Templates for CCAUII


This is an update of an article I wrote in 2010,  that is now up to date with the current solution starter package.

Picking though the examples and documentation for UII to figure out how to setup your first ( or 10th ) hosted control, adapter, or CTI adapter is a bit of a pain. Not to mention a bit time consuming… most of the time in the CCF Days, I would just grab another control I had written and use it as the ‘boiler plate’ for doing what ever I needed to do.

As we put together internal and partner training for CCA\UII for CRM 4, I took the time to create a few project starters for things that I do a lot, such as Creating Hosted Controls, or Search controls and CTI adapters. Those of you that have attended the CCA training events will have seen one of them already as we use templates in module 3 of the training. 

I had made prior versions of these templates available to folks via a VSI file on sky drive,  the major issue with this delivery channel is that I don’t have a clear idea as to how valuable they are to folks or a means to keep folks up to date as a fix and publish updates.

To address that, I have made these solution starters available via the Visual Studio Gallery for folks to use, the limitation is that you must be doing development on Visual Studio 2010 or newer to utilize these templates.  This will also allow me to keep things up to date as necessary

You can download them from the Visual Studio Extensions manager by searching for UII , CCA or CRM or by clicking here.

Change Log:

Ver 2.0 – 6/15/12

  • Updated Default sizing on WPF Controls to use “design” sizing vs actual sizing in the templates.
  • Agent Desktop Template :
    • Major updates to the connection manager in the agent desktop to support office 365 and token renewal  - in general this can be patched into your desktop by copying the CrmConnect folder to your project from a new desktop project built from the template. ( Updating namespaces as necessary )
    • Added sorting of organizations when choosing orgs.
    • Added a cancel link on the splash screen.
  • CTI Starter Solution
    • Added all created projects to a sub solution folder to support multiple CTI projects in one base solution.

 

What templates are provided

I am providing 8 project templates and 6 item templates for use with UII

Project and Item Templates:

  • UII Application Adapter Control
    • This provides a base project template for creating an application adapter
  • UII Web Application Adapter Control
    • This provides a base project template for creating an web adapter. Note: this is not a HAT control,  the Web Application Project type creates a HAT control
  • UII Windows Form Hosted Control
    • This provides a base project template for creating an winform hosted control with the session, doaction handlers, and context handers prewired.
  • UII WPF Hosted Control
    • This provides a base project template for creating an wpf hosted control with the session, doaction handlers, and context handers prewired.
  • UII Windows Form Customer Search Control
    • This provides a base project template for creating an winform hosted control with the session, doaction handlers, context, session creation, and search logic handers prewired. It also supplies a base customer payload class.
  • UII WPF Customer Search Control
    • This provides a base project template for creating an wpf hosted control with the session, doaction handlers, context, session creation, and search logic handers prewired. It also supplies a base customer payload class.

Project Only Templates:

  • UII Baseline Agent Desktop
    • As the name implies, it is a baseline agent desktop shell, with 5 hosting areas, a hidden area , a CrmConnection manager, about window, and splash screen.  It supports all methods of login to CRM including federated.   This desktop is functioning standalone, and provides code level documentation as to what it is doing.
  • UII CTI Starter Solution
    • This solution lays out all the base components necessary to create a CTI adapter for UII.
    • Within this solution:
      • The BaseCitConnector project is the communication layer for talking to the downstream CTI solution. This control is setup to talk to the CTI solution via polling, however it can be adapted to whatever you need.
      • The BaseCitDesktopManager is the Interface layer that UII uses to manage events between UII and the BaseCTIConnector, it is also the control that instances the AgentState and CallState Manager Classes in the next assembly.
      • The BaseCtiStateManagers are the translators for CTI => CCA and places where you can add extended functionality beyond the core control set we offer.

How to install it.

You can download them from the Visual Studio Extensions manager by searching for UII , CCA or CRM or by clicking here.

When you begin the install you will be presented with a window that looks like this:

image

You will notice that the message “This extension does not contain a digital signature” is present.

This is normal, as I have not signed this package.

Push Install to complete the install,  after which you will be presented with a dialog that looks like this:

image

You can verify that everything went fine by opening up VS and Clicking the “New Project”. Under Visual C# you will see a area called UII

In that section you will see 10 project templates that looks like this ( if you also have HAT Installed, otherwise you will see only 8 )

image

 

Important Notes..

I have provided the templates in Visual C# only. You will not find them in the VB.net area of Visual Studio

All of the templates configured with “local” references to the UII framework directory, which means you will need to update the References Paths to point to the UII Install Directory \ Framework directory.

To Do that,

Right click on the project in the solution explore and choose “properties”:

image

then choose the “Reference Paths” from the project areas:

image

Next, Click the … button next the folder box, and Navigate to your UII Install Directory. If you used the default install that’s going to be C:\Program Files\Microsoft Uii\Framework

Once you have selected the folder, click “Add Folder” under the Folders box.

That should fix all the reference problems and you should be good to go.

I hope folks find this useful, Please post comments on the Gallery site , MSDN forums , codeplex or as comments here.

Happy coding.

Comments (8)

  1. Zhenxin Wang says:

    Hi, Matt

    Any words on HAT upgraded for VS2012?

  2. Jonathan Garcia says:

    Hi, I installed the software on my Windows 8 machine (VS 2010) but I can't find the dlls or the path to reference. Any ideas?

    Thanks!

  3. JGO -JorgeGO says:

    Dear Matt,

    any actions to update templates to "metro style".

    I am the intention to make the exercise, we could share experience.

    Jorge Gonzalez Segura

    CRM / Microsoft Architect

    LinkedIn: es.linkedin.com/in/jordigo

    Tw:JORDIGO

  4. Sowmya says:

    Dear Matt,

    From where I can get the HAT (Web application ,External application) templates ?

    Couldnot find them in online gallery.

    I want to create a UII web application - To automate using the worflows.

    Awaiting response.

  5. MattB-MSFT says:

    The HAT Templates are added when you install HAT from the UII distribution.

  6. USD does not create an instance of CTI Connector says:

    Hi Matt

    We met at extremeCRM 2015 in Madrid

    As I told you then we want to integrate USD with Cisco Finesse using REST and XMPP APIs

    We got GenericListenerAdapter working OK

    Now we are working on the custom CTI adapter

    We are using CRM Online at btspain.crm4.dynamics.com

    We have followed the documentation at MSDN and we think we are following the steps but the problem is:

    1. USD creates an instance of CTI Desktop Manager, we know because we see the log file and we are able to break into the debugger and see the constructor method execution

    2. USD does not create an instance of CTI Connector

    3. USD does not invoke SetRootCtiInterface on CTI Desktop Manager

    We do not see how USD knows the relationship between a CTI Connector and a CTI Desktop Manager.

    The traces are below.

    Please notice "BT CTI Desktop Manager" with class BaseCtiDesktopManagerControl is running but "BT CTIConnector" constructor is not executed:

    >>> Added UsdTraceListener in Microsoft.Crm.UnifiedServiceDesk.Dynamics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to AIF Services

    >>>>>>>>> Found 5 Panels

    >>> Before Create Main Layout

    >>> Before Create BT CTIConnector

    >>> Before Create BT CTI Desktop Manager

    >>> Before Create Connection Manager

    >>> Before Create CRM Global Manager

    2015-06-03 12:40:59;info;BaseCtiDesktopManagerControl;Empieza ctor 2

    2015-06-03 12:40:59;info;BaseCtiDesktopManagerControl;Fin ctor

    >>> Added ICrmUtilityHostedControl in Microsoft.Crm.UnifiedServiceDesk.InteractionControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to AIF Services

    IN DESKTOP CORE CALLING EXE DEFAULT ACTIONS IN DO SET CONTEXT

    >>>>>>>>>>>DESKTOP LOAD COMPLETE EVENT FIRED

    GLOBAL CRM UTILS INTERFACE --> LOADING.

    GLOBAL CRM UTILS INTERFACE --> READY.

  7. Fixed :) says:

    Hi the fix was to make CTI Connector global

    May be should fix the web doc because it does not say so

    HTH

  8. MattB-MSFT says:

    Thanks for the Comment... we have fixed this in the docs

Skip to main content