Who's Bruno Willian

My photo
I'm Bruno, I've been working as a Dynamics CRM consultant since 2012. This blog is intended to share acknowledgement not only about Dynamics, but also any technology we use to extend the platform.

Monday, August 11, 2014

CRM 2013 New Feature - Private Queues

Today I am going to give an introduction about a new queue type, private queues. It is known by everyone that once given a permission for someone to read queues the users granted with that permissions could see all queues in the system.

Some times it was a problem because there were too much queues in the queues view or maybe the customer wanted to restrict the queue access which was not possible until the last update release.

By creating a private queue we are able to restrict the queue access only to members of this queue. Note that when you chose private queue type a new grid of users appears on the queue form, just users added to this member list will be able to see the queue.

The owner of the queue is automatically added to the queue team.





Wednesday, January 29, 2014

Microsoft.Crm.ObjectModel.MultiCurrencyPlugin

Today I faced an error which took me about three hours to solve it, that messsage appeard when I tried to save a record which I was sure there was no plugins running against it.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>An unexpected error occurred.</Message>
  <Timestamp>2014-01-29T16:57:37.9734966Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.MultiCurrencyPlugin]
[f6d4ebbb-0075-407d-8208-26575bfa39af: MultiCurrencyPlugin]

</TraceText>
</OrganizationServiceFault>

I rummaged the whole internet trying to find out the cause of that issue without luck, people on the internet say that it's caused by currency field stuffs, however it wasn't in my case.

Tired I curiously went to check out plugin registration Assemblys, that's when I noticed that the following steps were disabled (don't ask me why).








Enabling those steps solved my problem.

Hope it helps someone else.

Wednesday, January 22, 2014

Invalid where condition. An entity member is invoking an invalid property or method

I had recently been requested to perform a query in Dynamics CRM database using Linq without EntityGeneratedCode aid, that's when I came up with this error: "Invalid 'where' condition. An entity member is invoking an invalid property or method.".

I thougth it was some syntax error I had gotten, however it was not. Take a look at the code at this moment.

  Guid id = new Guid("2C2B13B2-E881-E311-93FA-00155D1E6428");
   var query = from c in orgContext.CreateQuery("account")
                     where ((EntityReference)c.Attributes["accountid"]).Id == id
                     select c;

With some help I found out that it's a frequent error when using linq. It's pretty easy to solve that, I just had to put off the "Attributes" string from the query. So it's like that right now.

 Guid id = new Guid("2C2B13B2-E881-E311-93FA-00155D1E6428");
  var query = from c in orgContext.CreateQuery("account")
                    where ((EntityReference)c["accountid"]).Id == id
                    select c;

I still don't know why it must be this way, but anyway, that's the way I found to fix that.