Duane Napier's Blog

Microsoft Dynamics CRM

  • Follow Duane Napier's Blog on WordPress.com

Posts Tagged ‘Microsoft Dynamics CRM 2011’

Adding Bing Maps to CRM 2011

Posted by duanenapier on December 31, 2012

When I give presentations to companies on Microsoft Dynamics CRM I am often asked if the product has any map integration for a salesperson’s use. This article will step you through the process to integrate Bing Maps.

Many times there is a need (or strong desire) to show an address on a map for a business or contact. Many companies would like to have their CRM system integrate with a mapping system without buying a 3rd party tool but aren’t sure how to do it. In short, it’s very easy and it only takes a small amount of time to set up an iFrame and Bing Maps inside Microsoft Dynamics CRM 2011.

What’s Required:

1) Create an iFrame on the Contact (or Account) form.
2) Create a JavaScript web resource (this is easy, don’t get overwhelmed just yet…)
3) Add an OnLoad event to the form.

Steps:
1) Customize the target form
a) Create an iFrame called Map (This newly created form field will show something like IFRAME_Map once you publish it).
b) Set the target to _blank & be sure to UNCHECK the “restrict cross-frame browsing”

BingMapiFrame

2) Create a Web Resource file that contains the form JavaScript. The JavaScript will be fired on the form OnLoad event which will take the address lines If you are using the Out Of the Box fields you can use the below syntax for your Web Resource file. CRM2011 supports older JavaScript so you may notice that I am using the older CRM 4.0 JavaScript syntax for the form fields.

function bingmap() {

var AddLine1 = crmForm.all.address1_line1.DataValue; var AddCity = crmForm.all.address1_city.DataValue; var AddState = crmForm.all.address1_stateorprovince.DataValue; var AccountZip = crmForm.all.address1_postalcode.DataValue;

if (AddLine1 != null )
{
var MapURL = ‘http://www.bing.com/maps/default.aspx?v=2&where1=’ + AddLine1 + ‘,’ + AddCity +  ‘,’ + AddState + ‘,’ + AccountZip ;
if (MapURL != null)
{
crmForm.all.IFRAME_map.src = MapURL;
}
}
else
{
// alert(‘no address’);
}
}

3) Customize the form and do the following:
a) Add the BingMap web resource to the form library
b) Add the bingmap function web resource to the form event handler

BingMapImage
4) Publish the form.

In this screenshot I have made a custom “Land” entity and integrated BingMaps.
LandMap
Following these easy steps will allow BingMaps to work in your Microsoft Dynamics CRM 2011 environments.

Posted in JavaScript, Microsoft Dynamics CRM 2011 | Tagged: , , , , , , , , , | Leave a Comment »

How to turn off the Getting Started help pane

Posted by duanenapier on May 18, 2011

It is very easy to turn the Getting Started feature on or off in Microsoft Dynamics CRM 2011.

1) Click on Administration under Settings

2) Click on System Settings

3) Click on NO in the get started pane area

Posted in Microsoft Dynamics CRM, Microsoft Dynamics CRM 2011 | Tagged: , , , | Leave a Comment »

How to add a Many to Many entity to the Entity Navigation Pane

Posted by duanenapier on May 3, 2011

This post steps you through the process of adding an entity that has a Many To Many (N:N)  relationship to the left hand navigation on a form.

It is relatively easy to add an entity that has a Many to Many relationship to the Entity Navigation Pane. If this sounds a little foreign, think of it this way, assume I have a Contact in CRM that I would like to be associated to many restaurants. I would also like the restaurant to be associated to many Contacts. I would set up the Many To Many relationship in Microsoft Dynamics CRM then I would need to ‘expose’ that relationship on the Contact form and\or on the Restaurants form. This post will briefly provide the simple steps and a video to explain how to expose the Many To Many relationship.

1) In the form designer click on the Navigation icon.

2) In the right hand side of the form in the Relationship Explorer area click on the Available Relationships filter and select N:N Relationships. This step is very simple but easy to miss.

3) Select the desired Entity and drag it into the Entity Navigation Pane on the left hand side of the form.

Take a moment to get your breath (because you’re probably winded by now)…save and publish your changes and you’re done. Pretty hard huh? Just in case you couldn’t follow those steps here is a video how to do it as well:

Posted in Microsoft Dynamics CRM 2011 | Tagged: , , , , , , | Leave a Comment »

CRM External Connector License

Posted by duanenapier on April 29, 2011

Starting with Microsoft CRM 3.0, Microsoft created an External Connector License. This post will outline the External Connector respective to Microsoft Dynamics CRM 2011.

What is this license?
This license allows you to expose CRM data to your customers utilizing a portal strategy. The customers that you have explicitly given access to CRM data will not log into you’re your Microsoft Dynamics CRM 2011 web site nor will they use Outlook to access the CRM data. These customers will access your portal to interact with the CRM data that you have been given access to. There is an accelerator to help you set up a portal and expose a handful of entities, it is found here http://customerportal.codeplex.com/.

When do I need the External Connector License?
According to Microsoft sources, you only need the external connector license when On-Premise is used and NOT when using Microsoft hosted CRM Online.
In the case of a web portal, the users are not logging directly into the application in this case CRM Online (MS Hosted) and can authenticate username & password via a variety of non-WLID protocols, so Microsoft Dynamics CRM Online allows non-licensed access in those scenarios.  This includes read/write access to data that can two-way synch w/the Microsoft Dynamics CRM database. The users are not accessing Microsoft Dynamics CRM UI i.e. forms and views etc. This is VERY different from On-Premise and so is understandably confusing.  Most of the Microsoft Dynamics CRM competitors charge extra for this type of access so in the case of a customer using Microsoft hosted CRM Online, this is a nice “loop-hole” for them. If a customer is using Microsoft Dynamics CRM On-Premise then they need to utilize the External Connector License.

Are there any limitations with the External Connector License?
Yes there are, below is an excerpt from the Pricing and License Guide which lists the capabilities of using the license:

External Connector – The External Connector provides external users with limited API access and limited read-write access to Microsoft Dynamics CRM 2011 data, such as that provided through any application/graphical user interface. The External Connector SKU will appear on price lists as the DynCRMExtConn.

The use rights supported for External Connector include:
• Read-only access to Accounts, Contacts, Cases, Leads, Activities, and Custom entity records.
• Data privileges to create Accounts, Contacts, Cases, Leads, Activities, and Custom entity records.
• Data privileges to append, append to, and update Accounts, Contacts, Cases, Leads, Activities, and Custom entity records created by any CRM user.
• No data privileges to assign, share, or delete records.
• Access to CRM server software and “Microsoft Dynamics CRM functionality” through any application/graphical user interface (GUI), other than the Microsoft Dynamics CRM client.

External Connector

Posted in Microsoft Dynamics CRM 2011 | Tagged: , , , , | Leave a Comment »

Web Resources in Microsoft Dynamics CRM

Posted by duanenapier on April 4, 2011

The use of JavaScript in forms has changed from Microsoft Dynamics CRM version 4.0 to Microsoft Dynamics CRM 2011. Below are some main differences from CRM 4.0 to CRM 2011 & 2013:

  • Adding \ Using JavaScript in a form
    • CRM 4.0
      • Basically there was 1 step to add your JavaScript. Open the form editor, click on events and enter your code in the window for the OnLoad event. No need to write an actual function, the window served as your OnLoad function, you just write code as if you were in the OnLoad function.
    • CRM 2011 & CRM 2013
      • There are basically 3 steps to adding the same JavaScript. Even though there are more steps, you now have a more controlled environment with a better way to reuse code.
        1. Add a web resource
        2. Associate the web resource to the form (See image below)
        3. Associate a specific function to the form OnLoad or OnSave event or control OnChange event (See image below)
  • Writing the JavaScript
    • CRM 4.0
      • The JavaScript code you wrote in the code window was in the context of the event in which you opened the code window. If you opened the code window from the OnLoad event, you would write the code as if you wrote the opening function “function OnLoad() { ALL CODE HERE }”
      • Your form code that references form objects look like crmForm.all.FORMOBJECTNAMEHERE this was the form object model. In CRM 2011 it is different but the old object model is still supported.
    • CRM 2011 & CRM 2013
      • You will write true js files now, all code will be wrapped in functions. Example-> If you want to call a function from the OnLoad event you will write ” function MyFunction () { ALL CODE HERE } ”     Without the starting and ending quotes.
      • Your form code that references form objects start with Xrm.Page in CRM 2011. However you can still use the old object model, it is still supported.

Reference Images:

Web Resources Image:
Web Resources

CRM Form Properties Image:
Web Resources

 

Form Event Properties:
(This is opened by clicking the Add button above. Notice that you can Pass the object that is calling the call into the function.)
CRM Form Event Properties

 

Web Resource Content:
(Notice the code that interprets the ExecutionObject ( executionObj in the function ) that was passed into the function call.)
CRM Form Event Properties

Posted in JavaScript, Microsoft Dynamics CRM | Tagged: , , , , , , , , , , , | 1 Comment »

Goals and Rollup Queries in CRM 2011

Posted by duanenapier on January 8, 2011

Here is some high level information on Goals and Rollup Queries in Dynamics CRM 2011.

Goals:
• The “Sales Goals” CRM Accelerator is now baked into 2011
• I think of Goals as basically “query records”, meaning they query data that match the criteria outlined in the goal so you don’t have to ‘manually’ associate Opportunity records to a specific goal, the system dynamically associates them.
    > Goals are either revenue based or count based.
• Components of a Goal:
    > Owner
        >>This can be a user or a TEAM.
    > Time Period
        >> Fiscal period or custom period
    > Target
        >> (Quota)
    >  Parent Goal
    > Child Goals
    > Goal Metric
        >> Either a Count of something or Amount (Money, Decimal or Integer)
• Related records of Goals are “In Progress” records and “Actual” records.
    >  If an Opp is open it will be In Progress vs. Won it will be an Actual

Rollup Queries:
    > These are queries that are associated to Goals that further filter the records that should be associated to the goal.
    > In the Goal Criteria section of a Goal you can select which Rollup Query to use.

Posted in Microsoft Dynamics CRM 2011 | Tagged: , , , | Leave a Comment »

Hiding a CRM form tab

Posted by duanenapier on January 28, 2010

CRM4.0
The CRM form tab ordinals are zero based. You can place the following JavaScript code in the onLoad event:

//This will hide the first tab
crmForm.all.tab0Tab.style.display = ‘none’;

//This will hide the second tab
crmForm.all.tab1Tab.style.display = ‘none’;

The same code in CRM 2011:
Xrm.Page.ui.tabs.get(‘TABNAMEHERE’).setVisible(false);
Xrm.Page.ui.tabs.get(‘TABNAMEHERE’).setVisible(true);

Posted in JavaScript | Tagged: , , , , , , | Leave a Comment »