You know your users want to push your buttons.

You know your users want to push your buttons.

Microsoft Dynamics CRM 4.0 is already user friendly and intuitive.  However, there will be times where you want to nudge the CRM users along the road to productivity by providing a nice shiny button that does what they want.  In this case I want to add a button to a custom entity form, where upon clicking would automatically pop open a new related record.  

 A couple potential  case examples off the top of my head:  

  • Button to create a new Phone Call activity, related to an open custom entity record.
  • Button to create a new Contact record, related to an open Account record.

Since the button can run JavaScript on demand, you can think outside the box and consider other unique scenarios and possibilities.  

See below for the general procedure to get this published.  I’ll try to make it quick and painless.  

Customize your ISV.config file  

All Dynamics CRM deployments include a default ISV Config file.  However, this default file is typically riddled with developer test examples that can clutter your CRM if you’re not mindful.  On the other hand, it may serve as a useful reference to see some customization possbilities.   

If you want a clean ISV Config file with the button I’m creating, I’ve provided a copy here to download.  It’s up to you! 

ISV-button-template.zip  

To export or back up your current ISV Config file:   

  1. Navigate to Settings > Customization > Export Customizations.
  2. Export the ISV file to your desktop or local drive.
Exporting your ISV Config file

Exporting your ISV Config file

  Use your favorite XML or text editor program to view and edit your ISV customization file.  I particularly like the free Microsoft XML Notepad 2007 and Notepad ++. The code you want to add will look something like the below, nested in the Entities section. 

      <Entities>
        <Entity name=”new_customentity”>
          <ToolBar ValidForCreate=”0″ ValidForUpdate=”1″>
            <ToolBarSpacer></ToolBarSpacer>
            <Button Icon=”/_imgs/ico_18_debug.gif” JavaScript=”locAddRelatedTo(10016);”>
              <Titles>
                <Title LCID=”1033″ Text=”Create a new related record” />
              </Titles>
              <ToolTips>
                <ToolTip LCID=”1033″ Text=”Create a new related record based on this open record.” />
              </ToolTips>
            </Button>
            <ToolBarSpacer />
          </ToolBar>
        </Entity>
      </Entities>
 

  In the above code, we: 

  • Referenced where we want this button with the Entity name value.
  • Made this button available only when a record is saved by disabling ValidForCreate and enabling ValidForUpdate.
  • Added a couple ToolBarSpacer spots for neatness.
  • Referenced a icon for it at the Button Icon value.  The debug icon works for me.
  • Added Title and ToolTip info to let the users know what it does.
  • Added a simple JavaScript line to create a new related record.

To make this JavaScript work for you, you’ll need to find out the related entity’s “Object Type Code”.  It’s really easy.  Simply browse to your CRM deployment’s Metadata Browser, which is typically at this URL format: 

http://{CRM_URL}/{Organization_Name}/sdk/list.aspx

Click on the related entity’s details, and you should see “Object Type Code” number.  Insert that number in the parenthesis for this JavaScript snippet:

locAddRelatedTo({Object_Type_Code})

Follow me here: the locAddRelatedTo function will let the button open a new related CRM record of the entity I specified with the Object Type Code.  Simple as that.

 Once you finished customizing your new ISV Config file, make sure you upload it back to your CRM deployment. 

Last Step!  Enable custom menus and toolbars

If you published your new ISV config file and you still don’t see the changes, this is the reason.

By default, CRM disables the custom menus and toolbars.  This means CRM will simply ignore whatever ISV Config file is out there.

To enable your custom button:  

  • Navigate to Settings > Administration> System Settings.
  • Click on the Customization tab.
  • Add the Clients where you want this customization to appear.  The choices?  Web, Outlook, and Outlook Offline.
Custom Menu Settings

Custom Menu Settings

  Thanks to Mitch Milam’s blog for pointing me in the right direction.  

Tags: , , ,

CodePlex-logoOnce in a blue moon you’ll find the perfect tool for the job, and this is one of them.  On Microsoft’s open source CodePlex site is the MSCRM 4.0 Documentation Generator, an Excel 2007 add-in that will automatically generate documentation for the CRM 4.0 entities, fields, picklist values and JavaScripts you’ve developed.

This tool will save countless hours of documentation time, and will keep you focused on the real creative development and customization efforts that directly benefit your clients.

MSCRM 4.0 Document GeneratorThe resources you’ll need to get going:

  • Download the MSCRM 4.0 Documentation Generator (link to CodePlex download site).
  • Export the Customizations file (either ZIP or XML) from your Microsoft Dynamics CRM 4.0 deployment.
  • Microsoft Office Excel 2007
  • Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime)
    • This installation is provided in the setup of this tool, but you can also download it directly at this link.

As an alternative tool for generating CRM 4.0 Documentation, be sure to check out the CRM 4.o Form Reporter (direct link to the CodePlex site).

Full instructions from the CodePlex site below.

Installation
The add-in will run on Office 2007 Excel (with Visual Studio Tools for Office (3.0)).
Extract the installation files and run Setup.exe – it will attempt to install any prerequisites.
Once the setup completes, Start Excel.
The first time Excel runs with the add-in, you will be presented with a customization installation message – choose “Install.”

Usage
Open the Add-Ins ribbon, press the load button to load your XML, then press the “Forms” button.
Once you’ve created a “Forms” documentation spreadsheet, open a new blank spreadsheet and click the “Scripts” button, and then repeat with the “Picklists” button.

Many thanks to CustomerEffective’s Scott Sewell (and Merijn van Mourik) for sharing this thing of beauty.

Tags: , , , , , ,

twitter-logo-smallIt’s difficult to escape the Twitter hype nowadays, but in all honesty this “micro-blogging” tool is indeed a great source to be mined.  Twitterers can have informed opinions and news regarding some of your top clients, and having access to that information can be very valuable.  Disregard this resource at its own risk.

Twitter Search feed in a Microsoft CRM account record form

Twitter Search feed in a Microsoft CRM account record form

If your company is interested in learning about what the Twitterscape is chattering about your dearest customers, check out this easy-to-implement iFrame addition to your Microsoft CRM.  It’s basically a iFrame coupled with JavaScript that takes your customer’s Account Name and queries it on the Twitter Search page, all within a tab in CRM. You’ll be up and running in 10 minutes or less.  You will need at least System Customizer security permissions to implement.

See all the steps to adding this functionality after the jump. Read the rest of this entry »

Tags: , , , ,

Quickly backup your CRM JavaScript code.

Quickly backup your CRM JavaScript code with the Export Tool.

Let’s say you need to back up all customizations to your CRM 4.0 environment and document the changes.  Downloading the full XML customization file is an easy solution, but it doesn’t allow you to examine the custom JavaScript code that was applied all over the CRM entity forms. Is there another option besides diving into CRM and manually opening each entity customization form, one-by-one?

Enter Joris Kalz’s Microsoft Dynamics CRM Jscript Export Tool.  He provides the Visual Studio 2008 project, free to download.  It requires no interaction with your CRM.  To configure, simply edit the app.config file for your CRM environment.  To download the file and view configuration details, see the links below.

Microsoft Dynamics CRM Jscript Export Tool

For you CRM 3.0 veterans, Joris is the creator of the nifty Caching Tool back in 2006 that cranked up the speed of your VPC demo environments.  Thanks Joris, it saved a sales demo more than once!

Tags: , , ,

View in: Mobile | Standard