You are currently browsing the tag archive for the ‘CRM Online 2011’ tag.

Just a reminder to everyone, Mark’s book is out and available for ordering from Packt Publishing.

As I had the opportunity to proofread it, I have to say that the book is great, and Mark really pushed the limits on creating Dashboards in CRM 2011. It’s a great effort, and a very hot topic.

Great work!

Every now and then I get stuck on something where I didn’t pay enough attention when I was reading the documentation. This is one of those cases.

I was just playing with some OData scripts, and moving from one machine to another I realized that my calls were prompting for re-authentication on one of the machines.

Anyways, I go back to the documentation, which by the way is here, and one of the notes states:

“If you access the server locally using http://localhost or use an IP address rather than the actual name of the server, this will not be reflected in the value returned by this function. This means that if you are making web service calls or accessing web resources, Internet Explorer will apply security settings that apply to requests that cross domains. To avoid this, always connect to Microsoft Dynamics CRM using the standard URL.”

Interesting. There’s some work-around posts online, one of them being the use of document.location.

Just in case, if you ever find that users get prompted for authentication when running an OData call, that should probably be the first place to check.

Enjoy!

These are probably the most common generic data files I use for data load. I’ve posted them here for others to use as a starting point, but mostly for me to retrieve them easily rather than have to dig for them through my portable drive.

Canadian Provinces

USA States

Countries of the World

Enjoy!

July 26, 2012: Links have been updated to point to the new location of the files.

Working with lookup fields in CRM when using JavaScript is a little different due to the way the entity is handled. The following snippets will allow you to both read a value in a look-up, as well as to populate a value in the look-up (for cases when you need to pre-define a value).

Reading the selected value in a lookup:

var lookupItem = new Array();
lookupItem = Xrm.Page.getAttribute("new_specialty").getValue();

if(lookupItem[0] != null)
{
    var name = lookupItem[0].name;
    var guid = lookupItem[0].id;
    var entType = lookupItem[0].entityType;
}

Writing to a lookup:

if(new_Country == null)
{
    // alert("Preparing to set Country:");
    var countryName = "Canada";
   
    var lookupData = new Array();
    var lookupItem = new Object();
    lookupItem.id="{A53E3645-912A-E111-92BB-00155D146C19}";
    lookupItem.name=countryName;
    lookupItem.entityType="new_country";
   
    lookupData[0] = lookupItem;
    // alert("Assigning Country to Field:");
    Xrm.Page.getAttribute("new_relatedcountryid").setValue(lookupData);
}

Enjoy!

In some instances, you might need to put a lookup on a form, and based on the selection in that lookup, retrieve additional data about the entity referenced. One such example could be either the standard entities like Account or Contact, or a custom entity you have created.

The following snippet will help you do that, but first, be aware of a few things:

1. Using OData, you can make calls back to the server, and get the values you need. Whether calling your custom entity, or the default ootb ones, the easiest way to determine what you are calling is to have a look at the XML returned by a call to the web service:

http://[servername]/[orgname]/XRMService/2011/OrganizationData.svc

the return XML will give you all the available entity names. Find the one you need in there, as you will be using it in the script.

2. Use the following script on lookup change event:

        try
        {
            //Get entity data;
            var serverUrl = Xrm.Page.context.getServerUrl();

            var odataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/new_specialtiesSet(guid’" + guid + "’)";
            // alert("ODATA Select: " + odataSelect.toString());
           
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                datatype: "json",
                url: odataSelect,
                beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader("Accept", "application/json"); },
                success: function (data, textStatus, XmlHttpRequest) {
                    var org = data.d;
                    //Change form data
                    Xrm.Page.data.entity.attributes.get("new_specialtydescription").setValue(org.new_Description);
                },
                error: function (XmlHttpRequest, textStatus, errorThrown) {
                    alert(‘OData Select Failed: ‘ + odataSelect);
                }
            }
            );
           
        }
        catch(err)
        {
            // handle the error

        }

3. Observe two highlighted sections:

new_specialtiesSet is the value obtained from the XML returned by the web service call. To this value we pass the GUID of the current entity, which we can get by using this script:

var lookupItem = new Array();
lookupItem = Xrm.Page.getAttribute("new_specialty").getValue();

if(lookupItem[0] != null)
{
    var name = lookupItem[0].name;
    var guid = lookupItem[0].id;
    var entType = lookupItem[0].entityType;
}

org.new_Description is the actual field name in the looked-up entity (new_Description).

This way you can start populating current form fields with values from the look-up entity selected by the user. Be aware though that there might be a delay from look-up value change until the call takes place, results are returned and fields are populated. Depending on the environment, this could be visible or instant.

Enjoy!

Another great promotion is going on through to March 30th 2012. This is targeting existing On-Premise CRM customers, and offers a discounted price of 39$/seat.

This offer can be combined with the Big Easy Offer, offering you even more discounts and credits.

For more details see HERE.

And if you need a partner to assist with your solution, do not hesitate to contact Navantis Inc.

Enjoy!

I’ve had a few clients already asking about this behavior. You successfully install CRM for Outlook, whether in online only or offline mode. Everything works smooth, but when you try to configure the connection, it fails with the following message:

outlook_crm_error

“There is a problem communicating with the Microsoft Dynamics CRM server. The server might be unavailable. Try again later. If the problem persists, contact your system administrator.”

You might be thinking first to go look at the logs. They are in:

C:\users\USER\AppData\Local\Microsoft\MSCRM\Logs\Crm50ClientConfig.txt

Here you will see either an LDAP error, or missing credentials, etc. You could start researching all those messages, and most of the recommendations you will find online, including the MS KB article will tell you that this behavior is related to having Windows Live Essentials 2011 installed, and that you should do a repair on it, and/or try to re-install the Outlook client. After doing that a few times, with no luck, you might start to pull your hair.

What actually worked in my case, after 2 days of unsuccessfully trying all the suggestions, is a little bit of LOGIC. Oh yeah, that…

So, if it all comes back to authentication, and almost every other time I get the missing credentials message, where are these credentials stored then? Answer: in the Credential store. How do you get to it? Click on Start, in the Run area type “Credential” (no quotes), and the first suggestion coming back is Credential Manager. Open it.

image

image

Once opened, it will look something like this:

image

In the Generic Credentials section you will most likely find a few items starting with Microsoft_CRM_xxxxxxxx. Expand each and every one of these, and make sure that the credentials stored are indeed the correct values. In my case it was relatively easy to spot the issue, as the username field was blank.

Once the proper credentials are updated, all I had to do was to re-run the configuration, drop in the proper URL in place, test the connection, and voila, all working again like a charm.

Enjoy!

Many times I have to either test security for various users, or make customizations and test them with different accounts. As you’ve probably seen by now, your authentication/authorization is cached with the first session you log in, and any subsequent browser sessions will use the same account to log you in automatically.

Now, the trick to logging in with various users at the same time is to use the new InPrivate Browsing (Ctrl+Shift+P):

image

This will create a new and completely independent browsing session, allowing you to use multiple credentials at the same time.

Once you start the InPrivate session, your screen will look like so:

image

Additional details are provided in the window description:

image

Do check out the help file for additional benefits and detailed description of this feature.

Enjoy!

Image: two sessions running in parallel:

Every now and then I’m looking for one of the very popular CRM links that I need to refer to, and I have to run a search and usually click through a few links to get to it, so here’s the ones I use the most:

Update Rollups:

Update Rollup # Description
UR5 Update Rollup 5 for Microsoft Dynamics CRM 2011 (KB 2567454)
UR4 Update Rollup 4 for Microsoft Dynamics CRM 2011 (KB 2556167)
UR3 Update Rollup 3 for Microsoft Dynamics CRM 2011 (KB 2547347)
UR2 Update Rollup 2 for Microsoft Dynamics CRM 2011 (KB 2466086)
UR1 Update Rollup 1 for Microsoft Dynamics CRM 2011 (KB 2466084)

 

Microsoft Dynamics CRM Server 2011 – Download and 90 days trial.

 

CRM Guides:

Link Description
Microsoft Dynamics CRM 2011 Implementation Guide This guide contains comprehensive information about how to plan, install, and maintain Microsoft Dynamics CRM 2011. To click the most recent version, see the TechNet link below.
Microsoft Dynamics CRM 2011 Administrator’s Guide A printable version of the Help that ships with Microsoft Dynamics CRM 2011, On Premises.
Microsoft Dynamics CRM 2011 User’s Guide A printable version of the Help that ships with Microsoft Dynamics CRM 2011, On Premises.
Email Router Installation Guide for CRM Online Download instructions for installing Microsoft Dynamics CRM 2011 E-mail Router for use with Microsoft Dynamics CRM Online.
Microsoft Dynamics CRM 2011 Quick Start Guide for Business Users Print this quick start guide to learn basic tasks before you start using Microsoft Dynamics CRM 2011.

 

Outlook Integration & E-mail Configuration:

Link Description
Microsoft Dynamics CRM 2011 for Outlook Quick Start Guide Read these valuable walkthroughs to get started using Microsoft Dynamics CRM 2011 for Outlook
Microsoft Dynamics CRM 2011 for Outlook Installing Guide for use with Microsoft Dynamics CRM Online Download instructions for installing Microsoft Dynamics CRM 2011 for Outlook for use with Microsoft Dynamics CRM Online.
Microsoft Dynamics CRM 2011 for Microsoft Office Outlook Install Microsoft Dynamics CRM for Outlook. Microsoft Dynamics CRM for Outlook enables access to the same data through Outlook as Microsoft Dynamics CRM.
Microsoft Dynamics CRM 2011 for Outlook Installing Guide for use with Microsoft Dynamics CRM Online Download instructions for installing Microsoft Dynamics CRM 2011 for Outlook for use with Microsoft Dynamics CRM Online.
Microsoft Dynamics CRM 2011 E-mail Router The E-mail Router is an interface between Microsoft Dynamics CRM 2011 and an e-mail system.
How to configure the Microsoft Dynamics CRM on-premises and Microsoft Dynamics CRM Online E-mail Router in different deployment scenarios These documents lists steps to configure Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM 4.0 e-mail in different deployment scenarios.

 

Other very useful links include:

Microsoft Dynamics CRM 2011 Entity Relationship Diagrams

Microsoft Dynamics CRM 2011 Software Development Kit (SDK)

Dynamics CRM 2011 Developer Training Kit

Microsoft Dynamics CRM 2011 ISV White Paper

Microsoft Dynamics CRM 2011 Report Authoring Extension

Deployment and Operational Guidance for Hosting Microsoft Dynamics CRM 2011

Optimizing and Maintaining Client Performance for Microsoft Dynamics CRM 2011 and CRM Online

Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure

Getting started with CRM mobility

Configure Mobile Express in CRM 2011 (blog)

 

Enjoy!

I’ve been spending some time lately overriding the Lead qualification process, using a Dialog (or a series or Dialogs). All went fine, but I was missing one small piece of he puzzle, resulting in an error about the Customer.

Finally, the fix is pretty simple. If you create your Contact and Account in the same dialog, assign that back to the Lead’s Potential Customer, and use that field when creating the Opportunity. If you’re not creating them in the process, give the user an option to select the Account (do a Query CRM for Accounts), and assign the selected value back to the Lead’s Potential Customer.

Do not forget to update the Potential Customer on the Lead, as by default it’s null and the creation of Opportunity will fail when referencing that field.

Here’s an example:

image

Hope this saves you some time.

Enjoy!

Ok folks,

this is the third and last step in overriding the default out of the box Lead qualification process. At this point we have hidden the standard Qualify button, and we have added our own Qualify button. We have pointed it to a JavaScript function to be executed. Let’s take it one step further, and actually do something in the context of CRM with all that.

It only makes sense to ask the user the standard “Are you sure?” question.

If you missed the first two articles, they are here and here.

First off, let’s go back to the solution package we’ve already created. This includes all modifications to remove the old button and add a new one. In the customizations.xml file, find the Lead entity, and the RibbonDiffXml section. Identify where we’re defining the Action to a JavaScriptFunction. We’ll add three parameters to this function, and it should look like so:

<Actions>
  <JavaScriptFunction Library="$webresource:Nav_JS_Common_Lib" FunctionName="launchWorkflow">
  <!– workflowId, entityName, entityId –>
   <StringParameter Value="{e1037cac-756c-46e7-96d0-cdc572eafc65}" />
   <StringParameter Value="lead" />
   <CrmParameter Value="FirstPrimaryItemId" />
  </JavaScriptFunction>
</Actions>

Here’s more details about the parameters.

Do note that the GUID presented is the GUID of the Dialog we’ll be launching, the “lead” is the entity it acts upon, and the FirstPrimaryItemId is the id of the Lead we’re executing against.

Now, let’s shift our attention to the JavaScript function:

function launchWorkflow(dialogID, typeName, recordId)
{
// alert("From within launchWorkflow JS function!");
 
// Load modal
  var serverUri = Mscrm.CrmUri.create(‘/cs/dialog/rundialog.aspx’);
 
  window.showModalDialog(serverUri + ‘?DialogId=’ + dialogID + ‘&EntityName=’ + typeName +
    ‘&ObjectId=’ + recordId, null, ‘width=615,height=480,resizable=1,status=1,scrollbars=1’);
 
  // Reload form
  window.location.reload(true);
}

this function is quite self explanatory, and the same format applies for any Dialog you want to call, as you define the Dialog GUID outside of the function. Thanks to Mark for making this function more streamlined than the version I came up with Winking smile I kept the same values for window size, but you can change those as needed. You might want to revisit the reload form line at the end if you are going to change the Owner of the Lead. I prefer to close the window completely after this.

With all this done, and assuming you have the Dialog completed, repackage the solution and import it. Now test it. In my case, from clicking on Qualify, I launch the first question:

image

Now from within that dialog you can put your own logic and call other Dialogs or Workflows. Sky is the limit!

Enjoy!

This is a continuation of a previous post, where we removed the Qualify button from the Lead entity. This time we will be adding our own custom button.

Start by digging through the SDK. If you don’t have it, get it from HERE.

At the following path we’ll find the definitions for all the ootb entities:

sdk\resources\exportedribbonxml

look for the one related to Leads (leadribbon.xml).

In the <Ribbon> element you will the definitions for Tabs > Tab. We are looking for the Form’s main tab

<Tab Id=”Mscrm.Form.lead.MainTab” …

Identify the group you want to place your new button into, and copy the control ID for one of the other controls in that group. In my case, I want to place the new Qualify button in the Actions group.

Mscrm.Form.lead.MainTab.Actions.Controls

with this piece of info on hand, let’s go to the solution that includes the Lead entity, and add the two images we need for the button. These are two .png images, one 16×16, the other 32×32. Also, if you don’t have a JavaScript resource added, add it now. You will be able to call a JS function with this button.

Export the solution, and unzip it. Open up customizations.xml and look for the Lead entity section. In the <CustomActions></CustomActions>, where we added the HideCustomAction elements in the previous post, add right underneath those two the following code:

<CustomAction Id="Nav.lead.Form.QualifyLead.CustomAction"
            Location="Mscrm.Form.lead.MainTab.Actions.Controls._children"
            Sequence="1" >          
            <CommandUIDefinition>
                <Button Id="Nav.lead.Form.QualifyLead.Button"
                    Command="Nav.lead.Form.QualifyLead.Command"
                    LabelText="Qualify"
                    ToolTipTitle="Qualify the Lead"
                    ToolTipDescription="Qualify the current Lead"
                    TemplateAlias="o1"
                    Image16by16="$webresource:nav_btn_qualify16"
                    Image32by32="$webresource:nav_btn_qualify32"/>
            </CommandUIDefinition>
          </CustomAction>

Also, replace <CommandDefinitions /> with the following:

<CommandDefinitions>
            <CommandDefinition Id="Nav.lead.Form.QualifyLead.Command">
                <EnableRules>
                </EnableRules>
                <DisplayRules>
                </DisplayRules>
                <Actions>
                   
<JavaScriptFunction Library="$webresource:Nav_JS_Common_Lib"
                        FunctionName="launchWorkflow"
                        />
                </Actions>
            </CommandDefinition>
        </CommandDefinitions>

Do observe that the two images we’ve loaded for the button are in fact:

  • nav_btn_qualify16
  • nav_btn_qualify_32

and the JS resource is Nav_JS_Common_Lib. The function we are calling is launchWorkflow and for the purpose of testing we can add the following function in our resource library:

function launchWorkflow()
{
alert("From within launchWorkflow JS function!");
}

That’s it, now re-package the solution, and load it back. Test it by going to a Lead, and clicking the new Qualify ribbon button.

image

You will get the following pop-up:

image

Enjoy!

MVP Reconnect

Check out my course [Video]

Dynamics 365 Customer Engagement Administration

Dynamics 365 Customer Engagement Administration

Check out my course [Video]

Configuring and Extending Dynamics 365 Customer Engagement

Configuring and Extending Dynamics 365 Customer Engagement

Check out my course [Video]

Getting Started with Dynamics 365 Customer Engagement

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Reviewed Book

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 609 other followers

Follow Dynamics 365 Wizardry on WordPress.com