Showing posts with label CRM 2011. Show all posts
Showing posts with label CRM 2011. Show all posts

Friday, September 11, 2015

CRM Quick Connect from .NET Example App is Out on CodePlex

I wish when I was first learning to code in .NET for Dynamics CRM that I had a really quick example of how to make a connection.  I created this example in CodePlex.  It does little more than pops open a connection to CRM and gives your User ID guid back to you but it will show you how to get that far quickly.  The example applies to Dynamics CRM versions 2011 through 2015.

Download it here:  https://dynamicscrmquickconnect.codeplex.com/


I hope this helps!  Have a great weekend!

Tuesday, January 27, 2015

ADFS Self Signed Certificates and Microsoft Dynamics CRM.

ADFS Self-Signed Certificates are used for internal encryption and are separate from your SSL certificates.   You can sometimes experience a situation where these internal certificates auto-rollover.  when this happens it will bring CRM down.

Below is a blog that has a fix for this that seems to work if you follow all the steps to a T:

http://blogs.msdn.com/b/arpita/archive/2012/07/17/microsoft-dynamics-crm-2011-log-in-issue-due-to-ad-fs-certificate-rollover.aspx 

Additionally there is a way to push the date out using Powershell to make the renewal duration more like 5 years instead of every 365 days.

- Happy Tuesday!

Tuesday, January 7, 2014

CRMTipOfTheDay.com Has Launched!

If you haven't seen this site yet it's a handful of MVP's (including myself) providing you with a quick tip on a near day basis.  It's kind of a fun little site.  We have just over 40 tips out there so far.  Run through it if you get a chance and learn a few quick things.




- Happy Tuesday!

Friday, December 20, 2013

Important Note to CRM 2011 Administrators

If you administer CRM 2011 user accounts make sure and check to see if the user already exists before adding a new one.  I saw an instance where a disabled user already existed for an Active Directory user today and a new account was successfully created somehow.

The person could not log in and I am not even sure how you would resolve this in a supported manner because you cannot delete users in a supported fashion.

-Merry Christmas!

Tuesday, November 12, 2013

CRM 4.0 Event.mode Syntax Killed at Some Point in CRM 2011

Don't know why (or with what Update Rollup) event.Mode was removed, but in UR-15, event.Mode does not work as documented here:

http://msdn.microsoft.com/en-us/library/cc150868.aspx

It's alright though, in CRM 2011 they have a new construct documented here you can change your code to utilize.

http://msdn.microsoft.com/en-us/library/gg509060.aspx

Just  a quick tip for your Tuesday in case you install UR-15 and bump into this!

UPDATE:  It helps to understand how to pass the context as the first parameter as shown in the blogpost below, if you are having trouble after reading the documentation below, check this out:
http://rajeevpentyala.wordpress.com/2011/12/13/jscript-validation-on-activationdeactivation-of-record-in-crm-2011/

UPDATE 2:  It seems that this might only be a problem if using IE 10.  There are other CRM 4.0 syntax items that won't work properly for IE 10 that I bumped into also yesterday, but most things still work.


-

Friday, September 27, 2013

So... Just How Performant Can the CRM 2011 SDK Be?

David Evans replied to a different blog post of mine and pointed out that the product team has done a very large amount of work to make things work quicker through the CRM SDK and shared the video below.   I have heard David Cai tout how he has seen well over 200 rows per second in SSIS though his product.  I thought this was AMAZING considering I was used to Scribe and if I got 15 records per second I was pretty dang happy.  I could run more than one thread at once though if I could chunk up the job properly.

In the video below I was blown away.  Literally you will see using the maximum threads per second against CRM Online which hasn't always been known for being the most performant depending on where in the country you are accessing it from. You will see here shortly after 3:10 in the video where in a matter of seconds the process they run revs up to OVER 650 ROWS PER SECOND!  They are running 16 threads, but now I have a new appreciation for just what the SDK is capable of handling if you hit it just the right way.

Check out the video here and just skip to 3:10-ish to see them start running first with one thread and then with 16.  WOW!!!  http://player.vimeo.com/video/74729381

- I hope you enjoy this video!

-

Tuesday, September 24, 2013

Dealing With the 8k SQL Server Row Limits in Microsoft Dynamics CRM

Once or twice I have run into a CRM implementation in the course of my work that runs afoul of SQL Server's 8k row limit.  SQL Server has always had a limitation to how big a row in a table can be and SQL Server DB admins and database designers have long had to deal with.  For many applications you have options by using specific datatypes and other constructs to be able to work around these limits, but for CRM you do not have any control over the schema directly, and any kind of manual change would definitely be unsupported.

You can tell if you run afoul with this issue, it will throw a MSSQLSERVER ERROR 576.

There are things you can consider when though when designing your CRM entity structure that will help you get around these issues.   You can also apply many of these same principals in re-design after the fact to help get the problem back under control.

Here they are:

1. Look for entities that could be broken out into 1-M relationships

Maybe you don't need all of those fields in the same entity.  Look for entities that can be broken out into their own entities within the system.  This will alleviate the number of rows and over all  length of the table.

2. Shorten your columns

Don't use a bunch of space if you don't need to for fields.  Give your self enough room, but not so much room that you will never possibly use it all.

3. Look to see if there are fields you don't need

If there are fields in your source system that you know you never use, don't migrate them to the new system.  also if you find that there are unneeded columns in your Dynamics CRM system already, delete them.

4.  Look to see if there is any other logical way to break up your entity into multiple entities.

Maybe you don't have clear cut 1-M relationships all in the same table but maybe you are modeling something that is really more of a 1-1 relationship in your entity design.  Maybe you combined these at first for simplicity's sake, but breaking these out could also help if you are running up against this limitation.

Conclusion

Again, this is not a really terribly common issue in CRM implementations, or it hasn't been in my experiencem but if you run into this you will know that there are ways to work around this.

I also know this list probably isn't exhaustive, so feel free to add more things in the comments.

-

Sunday, July 21, 2013

Definitive Guide to Installing Microsoft Dynamics CRM 2011 on Windows Server 2012

I see a lot of questions come across the forums about installing Microsoft Dynamics CRM 2011 on Windows Server 2012, which is now fully supported since UR-13 came out.  It seems that there are a lot of manual steps you have to take before you start to avoid getting halfway through the install only to have it fail partway through, requiring you to do an uninstall, fix the issue, and re-install.  This often times leaves extra AD groups and other things that need to be cleaned up afterwards so hopefully I can save you some trouble up front.

Here we go!  Let's start with the SQL Server Configuration.

SQL SERVER 2012 Install and Configuration

I am going to assume that if you are installing CRM on 2012 then you are probably using SQL 2012, which may not be true, but their isn't too many  differences in the SQL Server install, we will run through a few things anyways though.

1. When installing SQL Server, or after you installed SQL Server (you can add them after install), you will want to make sure you install a couple features on your SQL Server

- Full Text Indexing
- SQL Server Reporting Services - Native

2. You will want to specify a domain user for your reporting services service as in installs where SQL Server is broken out from the app server, only a domain user (not a local user) will work.

3. You will want to set SQL Server Agent Service to start automatically in SQL Server Configuration Manager

4. Take a moment and install the IIS web server role on your Windows Server installation to handle the web interface for SQL Reporting Services and host it's web services

5. SQL Reporting Services will not be configured out of the box, you will have to do that, we will take a moment and look at this.

   - Open Reporting Services Configuration Manager, it was installed
with the SQL Server feature install.
   - Click on the section for Web Service URL and accept the default values given, or configure your own.


   - Now click on database, follow the wizard and specify the database information and create your report server database.




CRM Service Accounts

There are several service accounts you will need to create to install CRM on Windows Server 2012.  This process is no different than what you needed to do for Windows Server 2008 so I will link you to the Technet document that provides all the specific information about the 4 different service accounts you need to create for your CRM install.

  -  Get the service account information here: http://technet.microsoft.com/en-us/library/hh699825.aspx 

    NOTE: If your account names are long enough that the domain\usernames names are truncated (pre-win2k standards)  in comparison to the user@domain.com username you have to use the domain\user truncated form for the service accounts when configuring CRM.  It will fail and will tell you the credentials are invalid immediately if you don't, so you may catch this on your own, but wanted to draw your attention to it.  :)

Configure the Update Patch

Since UR-13 Microsoft officially supports Windows Server 2012, but that doesn't mean that the current server installer supports it.  The web download installer is slip-streamed with UR-6 but that won't install on Windows Server 2012 without some configuration.

1. Create a Config.xml file in the same directory as your installer.
2. Go to http://catalog.update.microsoft.com
3. Search for ‘KB2434455’ and install the windows update catalog
4. Click Add for “Setup Update for Microsoft Dynamics CRM Server 2011”
5. Click View Basket
6. Click Download button
7. After download, un-zip the cab file for the 1033 version (if en-us) for your architecture and copy the              .msp file to a directory you will create called c:\temp (if it doesn't exist already)
8. Copy the following text to your Config.xml file
   
<CRMSetup>
<Server>
<Patch update=”true”>C:\TEMP\Server_KB2434455_amd64_1033.msp</Patch>
</Server>
</CRMSetup>
9.  Save the file
10. Do NOT run the CRM installer YET!

App Server Configuration on Windows Server 2012

Ok, now comes the really important stuff that will save you a ton of time by preventing uninstalls and reinstalls during this process.  There are several features you will need to install manually and maybe one you need to remove prior to your install.  Failure to do these steps will result in the installation starting but not completing successfully.  This will then require an uninstall and a re-install, so make sure you take care of all of these up front.

  - Install (Role) IIS role
  - Install (Feature) Windows Identity Foundation 3.5
  - Install (Feature) Windows Search Service
  - Install (Feature) 2.0 to 3.5 .Net Framework

We need to take a moment to elaborate on the last one Install (Feature) 2.0 to 3.5 .Net Framework. This isn't nearly as easy in many cases as it should be.  As it turns out it doesn't install the sources on the system and the ISO is required in some circumstances.  This makes it a little tougher.

Almost every time I try to install this I have to do it manually using the methodology here: http://www.danielclasson.com/install-net-framework-35-server-2012/

Essentially you have to use the dism tool via administrator command line and specify the source location on your source media.  It's pretty straight forward on Daniel's post linked above.

Starting the CRM Installer So It Uses Your Configuration File

1.  Launch a command prompt as administrator
2.  Run the CRM Installer with parameters to tell it to use your Config.xml file
        I.E.  C:\{CRM SetupMedia}\SetupServer.exe /config config.xml
3.  Setup will launch and you can continue.  It should state that Setup has finished downloading the    update!!!  This is important.  If it states that no update was available, something is wrong with how you  hooked up the update patch file and your config file.

Now you just need to follow the rest of the install process as usual.

Install Update Rollup 13 (or the newest) on the Server

Not much to say here, but here's the link to UR-13: http://www.microsoft.com/en-us/download/details.aspx?id=37133

Install SRS (SQL Reporting Services) Data Connector

This is installed on the SQL Server that also acts as your SQL Reporting Server for CRM (does not have to be the same SQL Server you use for your CRM Server SQL Server)

1. First install Windows Identity Foundation 3.5 from windows server manager from the features section
2. Now insert or copy your CRM media to/on your SQL Server (if not also your app server), and navigate to the CRM installation media and to the /SRSDataConnector folder.
3.  Run the installer as administrator and install the connector
4. Apply UR-13 for the SRS data connector to the same server.
5. Add your reporting services service credentials (can be found in services on the SQL Server or in Reporting Services Configuration Manager) to the PrivReportingGroup.
5. Restart the SQL Server that you are using as your SQL Report Services server.
6.  After your restart, access CRM and try to open an out of the box report, if it fails, you may see an rsItemNotFound error, but you may not.  If you do you need to publish the out-of-the-box reports manually.
7. If you do need to publish manually consult the quick blog here.  It has it laid out beautifully. http://mg--blog.blogspot.com/2011/05/report-is-not-getting-displayed-when.html


Items Not Covered
- Email Router (update to come)
- IFD



- I hope this helps!

Tuesday, July 16, 2013

Use CSV Files not Application Adapter to Migrate From Salesforce.com to Microsoft Dynamics CRM 2011 with Scribe Insight

I have done a couple migrations from Salesforce.com to Microsoft Dynamics CRM these days and this time I ran into a quick gotchas I thought I would point out.

Use exported .CSV's to migrate data using Scribe from Salesforce.com.  Save the Scribe application adapter for Salesforce.com ongoing integration with other systems.

There are two reasons for this, it is faster, and you won't bump up against the SFDC dreaded 24-hour API usage limit.

SFDC BUG:  In the .CSV exports when trying to migrate OpportunityContactRoles to the stakeholder connection in CRM I found a bug.  In the Scribe adapter you could  see the isPrimary boolean value to denote a primary contact on an opportunity, which is on the form.  This just wasn't there in the .CSV exports from SFDC.  I don't know if other entities have issues like this where certain schema elements are missing from .CSV data dumps, but it's worth noting.

- I hope this helps!




Friday, June 28, 2013

SSRS Prefiltering for Microsoft Dynamics CRM 2011 On-Premise in a Snap, The Simple Scenario That Most People Want.

I feel like I had to poke around way too hard to get the easy answer of how to prefilter SSRS reports the way I see it in the system.  This example uses SQL-Based FetchXML based reporting on CRM 2011 On-Premise

This allows you to:

  • Run a report on just the record you are in from the entity form
  • Run the report from a view on just the records in the view or just selected records within that view
  • Run Advanced Find style filtering on your report if just ran from the reports section.
There are two steps:


1. You need to modify your query to include a specific prefixed alias.  This signals CRM to pass in the context of the records and filtering to apply by parsing in a subquery.

An example query without pre-filtering:

SELECT accountid, name FROM FilteredAccount

The same query with pre-filtering enabled:

SELECT accountid, name FROM FilteredAccount AS CRMAF_FilteredAccount

So that's all you need to do at the report level to enable pre-filtering


2. When uploading the report, you need to choose the "Related Record Types"  and add Forms for related record types, lists for related record types to the "Display In"  section.



-I hope this helps!

Wednesday, June 26, 2013

Connecting to CRM 2011 Through iOS (initial thoughts)

There is a good chance that in the near future I am going to have to start writing some CRM 2011 connection stuff for iOS.  Also, someone on LinkedIn asked me today what my thoughts were.

Some initial ideas:

I don't write much Objective-C. We use Xamarin quite a bit at RBA, which allows us to write most of the app once (in C#) and then just re-write the UI layer for iOS or Android.

For the connection you can do a couple of different things. Depending on what the app is for, you can create a SOAP-based .NET web service to broker the connection and pass data back and forth, otherwise you can usually use something similiar to a SOAP-only client like the one that is here: 
http://code.msdn.microsoft.com/windowsdesktop/CRM-Online-2011-WebServices-14913a16 (again, this will only work if your underlying app is still C#)

Here's some other great general information and links on non-.NET client development.
http://msdn.microsoft.com/en-us/library/gg327838.aspx

Tuesday, June 11, 2013

Format of Jscript SOAP Responses in Microsoft Dynamics CRM 2011 Organization Service has Changed in UR 12!

You used to be able to pass in your response.responseXML.xml into a function like the one below to parse out a response and pull individual attributes.

function parseResponse(responseXML, attributename) {

    debugger;
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.async="false";
    xmlDoc.loadXML(responseXML);
    x=xmlDoc.getElementsByTagName("a:KeyValuePairOfstringanyType");
    for (i=0;i<x.length;i++)
   {
      if (x[i].childNodes[0].text == attributename)
      {
         //we decode the base 64 contents and alert the HTML of the Iframe
          alert(x[i].childNodes[1].text);
      }
      
   } 
}

PROBLEM:  With UR 12 and above you can still use this type of function but the responseXML property no longer exists on the response object.

SOLUTION: now instead of passing in your myresponse.responseXML.xml property of your response, now the property of your reponse is just in a  new response property, so the new syntax would just be myresponse.response

I hope this helps!!

-

Wednesday, May 22, 2013

Arrrggghhh!! Mind Blown!

Pretty sure my mind just blew.  Guess it's time to restart Visual Studio.  Errors get really funky when you have .xaml files open sometimes.  WOW!!

Name of client is blacked out.



Hope this gets a laugh or two!

Friday, May 17, 2013

Using RetrieveAttribute Request in CRM 2011 To Get the Label Value for an OptionSet

Here is a quick way to get a label for an OptionSet value in Microsoft Dynamics CRM 2011 using RetrieveAttributeRequest.


private string GetCRMOptionSetLabel(IOrganizationService service, string entityname, string optionsetname, int value)
{
            
    RetrieveAttributeRequest reqOptionSet = new RetrieveAttributeRequest();
    reqOptionSet.EntityLogicalName = entityname;
    reqOptionSet.LogicalName = optionsetname;
    RetrieveAttributeResponse resp = (RetrieveAttributeResponse)service.Execute(reqOptionSet);
    PicklistAttributeMetadata opdata = (PicklistAttributeMetadata)resp.AttributeMetadata;
    var option = opdata.OptionSet.Options.FirstOrDefault(o => o.Value == value);

    return option.Label.LocalizedLabels.FirstOrDefault().Label;
}

- I hope this helps!

Wednesday, May 8, 2013

CRM MVP Developers Doing the Google Hangout Thing!!

Today I participated in a Google Hangout for the first time along with some fellow CRM MVP's (Donna Edwards, Daniel Cai, and Dave Berry).  The top of the conversation was development where we went through our thoughts on HTML5 vs Silverlight, JSON, JQuery, Jscript, Polaris, Orion, etc.. from a developer standpoint.

You should watch the video here:
https://www.youtube.com/watch?feature=player_embedded&v=i82l7ENifBk





BONUS:  at 53:40, I decide to go FULL PIRATE! :)



-

Thursday, May 2, 2013

The Current State of the WinRT Connection Code for CRM 2011

So, for the last week I have been working with the CRM 2011 connection code for WinRT released here:

http://blogs.msdn.com/b/crm/archive/2012/11/02/building-clients-for-windows-phone-and-windows-8-rt.aspx

Below are some general observations:

PROS:

  • It appears that they have covered their bases and things are pretty well set up Office 365 Online orgs and IFD on-premise orgs.  It seems like this would be workable in those particular scenarios.
  • Easy connection methodology built in.
  • Native connection from your app to CRM 2011.


CONS: 

  • Is not currently set up for AD auth on-premise orgs
  • While the authentication mechanism technically supports WLID authentication, there is no built in mechanism that I can find to to register your device and get a device username and password.  This presents a problem and makes this scenario unworkable for Windows Live auth for windows store apps where because before you could use the application you downloaded you would have to download the CRM SDK and run the command line tool to register your device and use it first.

- That's my two cents right now.


Thursday, April 25, 2013

Strange Address Behavior On Account and Contact in CRM 2011

I have noticed that if you put a customer address sub-grid on an account or contact form you can see the two out of the box addresses that are created when you create the record.

Just a note about these.  Do not delete them.  If you do the record won't work right and you will not be able to update your record until you re-create them.

:)

-Happy Thursday.

Monday, April 15, 2013

CRM Gamified Can Help You Boost Your User Adoption for CRM 2011!

The topic of gamification is not new, but CRM Gamified just released a great solution that allows you to apply it to Microsoft Dynamics CRM.  Gamification plays on ones natural competitive instincts (like playing a game), but in a non-game context.

Gamification can be useful in the CRM context as user-adoption can be lackluster when users aren't incentivised properly to use the new system.  By turning it into a game of sorts you can improve the drive towards full-adoption.

Here is a terrible picture of me from Convergence 2013 trying out one part of their app.





At least I won an XBOX 360 for my humiliation.  :)   But seriously, I recommend you check out their solution at http://crmgamified.com/
-

Wednesday, April 3, 2013

Azure Service Bus Changes to CRM 2011 Integration Changes (ACTION REQUIRED!!)


Azure Service Bus Changes to CRM 2011 Integration Changes (ACTION REQUIRED!!)

Word was just released today about impending changes to some Security around the CRM 2011 to Azure Service bus integration capabilities in CRM

This means that you need to make some configuration changes on your end or your Azure Service Bus integrations WILL STOP WORKING.

The go live date for the new Certs is different by region, they are below:

North America: 4/28/2013
EMEA: 7/26/2013
APAC: 7/25/2013

Get more info here:

https://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2013/04/03/microsoft-dynamics-crm-online-organization-integration-with-the-windows-azure-service-bus.aspx#.UV7lNJNg97o

-Hope this helps!

Microsoft Dynamics CRM 2011 Data Import Wizard Appears to be Broken in Google Chrome

Thanks to a blog reader it has come to my attention that the data import wizard seems to be broken if used from Google Chrome.  The "Choose File" button does not product a dialog.  It currently isn't doing anything.

I have tested this in versions 25.0.1364.172 m and version 26.0.1410.43 m

For now, if you want to use the Data Import wizard, use IE or FireFox.

This has been reported to Microsoft.

-Have a great day!