CRM 2011 – how to look up an account name using a guid

I was getting some errors with the Dynamic Connector trying to sync CRM accounts to NAV customer cards.

The first error I had was Country has to be a country code otherwise it errors.

I was still then getting some errors and the Dynamic connector just gives you the guid of the account which it cannot sync.  This is useful but a bit of pain to lookup an account from a guid.  You can’t use an advanced find because accountID isn’t searchable.

I was going to to export all the accounts to an excel and search for the guid but then I decided to use an oData query which you can just paste into a browser.

below is my odata query, it’s very simple it just returns the account name

http://<server:port>/<organisation name>/xrmservices/2011/OrganizationData.svc/AccountSet?$select=AccountId&$filter=AccountId eq guid’4f0f2e39-2877-e111-87f4-86e43cb98353′

You will need to put in the server name and port and then the organisation.  You can get this from your CRM url you normally use.

You would then need to put a valid guid.

The oData query returns all the accountSets (accounts) and filters only the accounts which have the same guid.