onsdag 24 juni 2015

Email Configuration button missing

No biggie, and quite documented but I'd like to point this out anyway. 

If you're not having any email configuration button in the settings area, then you have probably upgraded from CRM 2011 and the button isn't part of the sitemap. The solution is to add the following to you sitemap right aftert the <SubArea ID="nav_audit"...> tag,

<SubArea Id="nav_social" ResourceId="Social_SubArea_Title" DescriptionResourceId="Social_SubArea_Description" Icon="/_imgs/area/16_social.png" Url="/tools/social/social_area.aspx" AvailableOffline="false" />

It's pretty logic that you should add the social nav to get email configuration. Read more at
http://blogs.msdn.com/b/emeadcrmsupport/archive/2014/03/07/dynamics-crm-2013-email-configuration-tab-is-missing-from-the-settings.aspx

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

söndag 7 juni 2015

IFD/ADFS setup stumbles when you think you're done

I've been fiddling with IFD and ADFS a bit more than what's healthy the past couple of years and I still face the "What the h*** is wrong now"-moments from time to time. Admittedly they're a bit more rare and not quite as severe as they uses to be, thank god.

One thing I've been running into quite frequently the latest times I've been messing with IFD is that when you think you're done and you try to log on for the first time you get a "I can't connect to the ADFS-server"-message in the browser.
On the ADFS server the logs say "the element 'serviceIdentityToken' was fount to have invalid data", on the CRM server you have a "Exception information:
    Exception type: EncryptedTokenDecryptionFailedException
    Exception message: ID4036: The key needed to decrypt the encrypted security token could not be resolved from the following security key identifier " and the CRM trace tell you something like "Microsoft.IdentityModel.Tokens.EncryptedTokenDecryptionFailedException: Microsoft Dynamics CRM has experienced an error" (and by the way, yes, that's the coherent part of that error).

You think, probably at least since I have, What happened, I just connected to all these servers.
So, what needs to be done? I can't tell you exactly what makes things work but if you update the metadata in the ADFS server manager, restart ADFS-service, restart the IIS you should be fine.

If that doesn't work, start browsing Chris Cognettas blog.

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

söndag 31 maj 2015

Which version of ADFS are you running?

When you are setting up an Internet Facing CRM you need to use an STS service which often means ADFS. So which version are you running?

 Now, CRM of different verisons supports different versions of ADFS and the complete list is in your implementation guide. But how do you check for which version you are running. It turns out you don't. But have no fear, Jorge is your man here. This blog https://jorgequestforknowledge.wordpress.com/2014/02/23/gathering-architectural-details-from-your-adfs-infrastructure-adfs-version/#comment-17198 helped me to determine which verison that was installed on a system. Really, you have to look at how the GUI looks and see if there are files available.

This feels so 2015.

Have fun and thanks Jorge!

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

torsdag 28 maj 2015

SQL Server instance name must be the same as computer name

I was installing a CRM 2011 server the other day to do an upgrade for a customer and, yes I know this sounds impossible but I ended up with an error I haven't seen before.

It really was my own fault but still. I had installed the SQL server on the machine and then renamed it which made the SQL server behave in a bit interesting way. My CRM installation whined a bit about the server name not being the same as the SQL instance name which made no sence at all to me but when the reporting services complained too I ran the reporting services setup tool and this showed me that it was looking for an SQL server with a different name than what I expected.

This blog article shows how to deal with it https://zhongchenzhou.wordpress.com/2012/04/29/dynamics-crm-2011-installation-error-the-instance-name-must-be-the-same-as-computer-name/ .You will have to re-point the reporting services too, but that's a bit more intuitive.

Someone else would probably say something along the lines of "my eight year old can do this".

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

onsdag 27 maj 2015

CRM 2015 Online spring update and Outlook client

The CRM Online 2015 spring update... Experience, or something (version 7.1) is out.

I was looking for the updates for the Outlook client and had some problems finding it so I thought I would post the link here. https://www.microsoft.com/en-us/download/details.aspx?id=46908

Thats it, happy CRMing

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

tisdag 28 april 2015

Import Data privileges and appointment errors

Data import is indeed a powerful tool that will allow you to update many records at once, however to my great surprise the security settings to allow a user to import data is not completely simple to understand.
Next, when you get a log full of error messages you suspect something's wrong...


The first problem I was facing this time is to import data that has been exported from CRM. This seems to be a pretty straight forward operation, and it should be, however the security settings makes it pretty much everything but simple.

The user that was going to do the import had pretty high level of rights to do things in the system but when she imported data that had been edited in excel after export the data import job was suspended in limbo saying "imported" (or something similar) with the job halting with an error saying "Failed to get priv user group information. k = <guid> privUserGroupId: <guid>, localSystemAdGuid: <guid>, Exception: System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"

This made me look at the AD and the PrivUserGroup,even though I suspected that it wasn't the actual problem, no luck there. As I suspected that this wasn't the problem I tried to import the file using a sysadmin account which actually worked.
As I was done troubleshooting I tried to find the correct security settings to import files and found them on the Microsoft forums. The winning lineup is the following:

* Data Import (all)
* Data Map (all)
* Import Source File (all)
* Web Wizard (all)
* Web Wizard Access Privilege (all)
* Wizard Page (all)

You can probably get away with BU rights to be able to import stuff to your own BU. The entire thread can be found at Microsoft forum. It's a good thing that these things are simple to solve, and that the error message isn't something like "User X is missing security right Y", that wouldn't make it as interesting.

Moving right along with the next issue which I also was facing at the same customer. They had a LOT of error messages in the trace logs saying  "
>Crm Exception: Message: recurringappointmentmaster With Id = 00000000-0000-0000-0000-000000000000 Does Not Exist, ErrorCode: -2147220969". This made me slightly nervous considering that the customer also have had some issues with performance that we are investigating at the moment. Now, to make things clear, we are NOT being nice to the appointment entity with some heavy, but supported, customizations so I wasn't exactly chocked to see errors being thrown here.

I want to say that there doesn't seem to be a problem with the appointment entity since it's ok to create appointments most of the time, but we've also seen an alarming amount of "hey something's wrong, you want to send data to Microsoft?" boxes so it might have been something that wasn't optimal. Today I was helping one of the users with monitoring what the system was up to when she was doing her work so I had some time to sit down and have a look at the logs, which is one of the best things I know.
This error message was pertty common as usual and I started looking for others that had this issue but nothing obvious came up so I thought what happens in a completely vamilla system, something I haven't trie yet.
I had a CRM that I hadn't modified anything, CRM 2013 SP1UR1 on premise that I popped up an appointment form in and entered "test" in the topic field, lefter everything else as is (some dates but that's it) and saved. This gave me the exact same error in the trace logs.

This ticked me off a bit. Microsoft actually ships a system, in it's fourth or fifth iteration of that version and it truly SPEWS out error messages in the trace log when you create an appointment. That is not OK.

If you get a lot of errors with recurringappointmentmaster with ID = empty guid, that's how CRM is supposed to work. Sorry to say this though.



Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se

onsdag 22 april 2015

This is a draft post that I never finished, still the information is quite useful so I hope it helps someone. Read it as "a couple of months ago" :) //Rickard
 
It's been a while since I published something here, seems as the days are too short. Today I will discuss two problems I've encountered in the past weeks which gave me some (more) gray hair.

First thing happened this morning when a customer called saying that she couldn't run a report on an advanced find she had been using earlier. I tried to use the report on a small number of objects, 10 or so, on ALL objects and using the advanced find to select many objects (roughly 1700). I had no problems but when the customer did the same thing she got the following results: On a few objects the report worked as intended, on 250 objects it worked, on all objects it worked but when chosing all objects on all pages of the selected view after using the advanced find the report viewer just showed "error on page" at the bottom of the window. When closing the window I got prompted if I wanted to send info to Microsoft which I viewed and it said that "the object doesn't support the property or method".

Considering that I could use the report I set the system administrator role for the customer and when she tried again the report worked. A security issue one would think, well I removed the system administrator role to start test different possible scenarios but gave it a go again and tested the report. To my surprise it worked, the only thing I did was to assign the sysadmin role to the user, run the report and then remove it again. Very strange.

The other problem I had a few weeks ago when I was modifying existing, and working, code with a new function. Things went south pretty fast and I had to acquaint myself with the wonderful world of error messages in CRM 2011. What I did was that I needed to move variables from the pre operation state to the post operation state of a plugin. With these variables I would do an update and it had to be done after the operation.

Right, I consulted the all knowing SDK, The Junior Woodchuck Guidebook of Dynamics CRM. The answer was actually quite simple, SharedVariables. So since I wanted to pass a few variables I had a look at the structure which was a key-value pair so I figured I could pass an XML-object, which I did.

That was not the correct thing to do. There were no error messages when I did it but boy did things blow up when I used the plugin. It seems that you can't put anything serializable in the shared variables so I had to somehow enumerate the data that I put into the shared variables and then go through the set in the post state code, which worked quite alright actually. Lessen learned, don't put serializable objects in the shared variables, even if an XML might seem like something else.
In hindsight, I wonder if it might have worked with an XML as a string field which you read into an XML in the post state code.

Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se