Search code examples
c#dynamics-crmcrmmicrosoft-dynamicsxrm

The 'GrantAccess' method does not support entities of type 'pricelevel'


I'm trying to use the GrantAccessRequest object in the Xrm SDK client for a 2016 on premise CRM organization. The error I am getting is:

The 'GrantAccess' method does not support entities of type 'pricelevel'.

I understand that the Price List entity is not supported, I found that here: https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.grantaccessrequest.aspx

However I was wondering if there is a way to enable the GrantAccess method for this entity?

If not, is there another way I can do record based sharing on the Price List entity? My end goal is to allow Price Lists to only be shown to certain Business Units.

If more information is needed please let me know! Thanks!


Solution

  • The Price List entity is organization owned so the permissions are all or none. It cannot be restricted by business unit.

    Products are also an org-owned entity. A client had a situation where they wanted to restrict updating Products by business unit, so I wrote plugins that enforced the restrictions they wanted.

    You could theoretically implement this type of "pseudo-security" on the Price List entity, but it may be complicated and impact performance.