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

Inga kommentarer:

Skicka en kommentar