Thursday, February 23, 2017

Field Services for Dynamics 365 On-premise

Lately I've been searching for an on-premise solution of Field Services for Dynamics 365 / CRM and this is what I found.

Download Field Services for Dynamics 365 On Premise

Customers can download the solution binaries here for Field Services for Dynamics 365 on-premise.

Install Field Services for Dynamics 365 On Premise

Follow these instructions here to install field services.

Thursday, February 16, 2017

How to fix security role issue in Dynamics CRM 365 Online: Access Denied

End users sometimes receive error message regarding permissions like the one shown in the below screenshot. Access is denied error.


The quickest way to identify the error is to ask the user to Download Log File and forward you the file. You can easily identify the error log file and rectify the issue.

This is the log file that you see:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 62ccfada-fefa-e511-810b-1458d0431690, OwnerId: 00000000-0000-0000-0000-000000000000,  OwnerIdType: 8 and CallingUser: 1e09c053-3cb8-e511-8105-1458d0431690. ObjectTypeCode: 8, objectBusinessUnitId: 6661ae5f-f0e2-e411-80fb-c4346bac6e74, AccessRights: AppendToAccess Detail:

xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
1e2012e6-9057-4a0f-bae1-a5b940828e24
-2147187962
xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 62ccfada-fefa-e511-810b-1458d0431690, OwnerId: 00000000-0000-0000-0000-000000000000,  OwnerIdType: 8 and CallingUser: 1e09c053-3cb8-e511-8105-1458d0431690. ObjectTypeCode: 8, objectBusinessUnitId: 6661ae5f-f0e2-e411-80fb-c4346bac6e74, AccessRights: AppendToAccess
2017-02-16T11:14:35.7151013Z






ObjectTypeCode and AccessRights are the 2 items you need to focus on. ObjectTypeCode is the numerical representation of an entity or item. Microsoft provides you a list of ObjectType Code mapping for CRM.

In this case the code is 8 which states its a SystemUser. Which means the User entity doesn't has Access Rights of AppendTo. Enabling that would solve the issue.

But how about for custom entities, you ask?

Here is what you should be doing. For custom entities, open your browser and browse to this URL.
https://mycrmorg.crm4.dynamics.com/main.aspx?etc=11068&pagetype=entityrecord

Where etc=11068 is taken from the error log file which is the ObjectTypeCode. When you browse to this URL, the entity record page opens, which points you to the direction that this custom entity needs the AccessRight as mentioned in the error log.

I hope this helps!