Adding a Phone Call Button

Recently a client asked me (after a bit of consultation) to add a Create Phone Call button to the Contact form to make it easier for the users to quickly record a conversation with a customer. This can be done by editing the ISV.config. The ISV.config is exported from CRM, can be modified, and then imported back into CRM to add features. I will let you learn about those particulars elsewhere. In this blog I’ll simply concentrate on the Phone Call button.

image 

At first I thought I could simply add a URL for the Phone Call data form, ‘http://crmserver:port/organization/activities/phone/edit.aspx’ (or simply /activities/phone/edit.aspx) to the button code in ISV.config. Unfortunately this gave me a blank Phone Call form without including the Contact record information. So I did some head scratching and research. Nowhere did I find any specific code I could use, though I did find some useful information in “Programming with Microsoft Dynamics CRM 4.0” by Jim Steger and Mike Snyder. They had an example of using JavaScript instead.

To figure out what I needed to include in the code I created a Phone Call from a Contact record (Actions -> Add Activity -> Phone Call) and examined the URL of the resultant form.

Part of the ISV.config button code includes a specification for an icon. Normally one might use the default icon. That works but I wanted a ‘phone’ looking one. So I searched thought the icons available and finally found it, /_imgs/ico_18_4210.gif. Looks good.

The following code snippet can be added to your ISV.config in the <Entities> section and includes the phone icon. Be sure to study the SDK if you are not familiar with editing the ISV.config. And remember it is all very case sensitive.

<Entities> 
        <Entity name=”contact”>           
          <MenuBar>
          </MenuBar> 
          <ToolBar ValidForCreate=”0″ ValidForUpdate=”1″>                
            <Button Icon=”/_imgs/ico_18_4210.gif” JavaScript=”
                        var url = ‘/activities/phone/edit.aspx?';
                        var params = [
                              ‘pid=’+crmForm.ObjectId+
                              ‘&amp;pType=2’+
                              ‘&amp;pName=’+crmForm.all.fullname.DataValue +
                              ‘&amp;partyid=’+crmForm.ObjectId +
                              ‘&amp;partytype=2′ +
                              ‘&amp;partyname=’+crmForm.all.fullname.DataValue +
                              ‘&amp;partyaddressused=’ +
                              ‘&amp;contactInfo=’
                              ].join(”);
                        openStdWin(url+params);”
                    Client=”Outlook,Web” AvailableOffline=”true”>
              <Titles>
                <Title LCID=”1033″ Text= “Create Phone Call” />
              </Titles>
              <ToolTips>
                <ToolTip LCID=”1033″ Text=”Create a Phone Call Activity Record” />
              </ToolTips>
            </Button> 
        </ToolBar>         
      </Entity>
    </Entities>

Even though this worked fine on my system, when I ported it to my client’s I had to do some tweaking to get it to install on his. Close attention to the peculiarities of ISV.config syntax is essential.

Finally, in order to activate ISV.config customizations, you must set the appropriate options in CRM. To do so in CRM go to Settings -> Administration -> System Settings. Click on the Customizations tab and in the ‘Custom Menus and toolbars’ section set the Clients to what is appropriate, normally ‘Web Application, Outlook, Outlook Offline’. This will activate ALL ISV.config customizations in those clients.

 

image

Installing CRM Outlook Client on Windows 7

Windows 7 was recently released to manufacturing (RTM) and made available to MSDN and TechNet subscribers. So I’ve downloaded and installed it. It’s pretty nice. Naturally I want to be able to run CRM on it. Most of the folks I’ve heard from had no problems getting the CRM Outlook client to work on Windows 7. However I ran into a few snags. Hopefully a couple of tips will help someone else.

First, I tried to install it on top of Office 2010. This didn’t work too well although I was able to upgrade my Vista Outlook 2007 to Outlook 2010 with no problem. I decided to install Outlook/Office 2007 on Windows 7 first and will eventually try to upgrade that to 2010.

Windows 7 is installed on my laptop so naturally I need the Outlook Client With Offline Access. This is where my bumps in the road appeared. First, one of the pre-requisites that the CRM install program loads is the SQL Report Service Report Viewer. For some reason this would not load on my machine from the CRM install (unknown error). I resolved this by searching for the ReportViewer.exe from the Microsoft web site. This installed without a hitch and resolved that problem. The rest of the installation went fine.

The next step was running the CRM Configuration Wizard. It failed saying Access Denied to updating the SQL Master database. I presume that would be during the creation of the CRM offline database. This I was able to resolve by running the SQL Server 2005 Surface Area Configuration wizard (which got installed with the SQL 2005 Express during the CRM install) and adding my user account as a Member of SQL Server SysAdmin role on CRM. Once done, the CRM Configuration Wizard ran and now the CRM Offline Client resides and runs great on my Windows 7 64-bit notebook. Next step – upgrade to Office 2010. I’ll let you know how that goes.

CRM Accelerators and SBS 2008

I recently installed the CRM 4.0 Event Management accelerator. However, when I tried to run the web portal associated with the accelerator, it failed. The error message indicated that Microsoft.Crm.Sdk.dll was in the wrong format. Luckily I was able to enlist the help of my good friend and fellow CRM MVP Ronald Lemmen who questioned whether my server was 32-bit or 64-bit. Since my server is SBS 2008, it is 64-bit. He suggested I replace the .dlls with the 64-bit versions. They are located in the SKD in the \bin\64bit folder. Here I found the microsoft.crm.sdk.dll and microsoft.crm.sdktypeproxy.dll files. I copied these into the appropriate folder in the accelerators web site folder and voila! It worked. Ron credited Reuben Krippner as having posted the idea in the forums. Thanks, guys!

I am making some ‘refinements’ to the Event Management accelerator. I will post them here once I’m done. This accelerator is a great example of how CRM can be customized. It includes many elements: Custom Entities, Plug-in, Workflow, and Web Portal.