Bench Update with Offline Tools

I’ve updated Woodswork Bench. Along with some visual stuff, it now also hosts my offline tools:

bench

  • Simplicity; built for Microsoft Dynamics CRM 2011 this tool provides Guid Mining, and URL Building services.
  • Determination; a light weight IronPython scripting tool specifically setup for Microsoft Dynamics 2011, however it suitable for use with any .Net assemblies and MSCRM version.

Check it out here.

Announcing Bench

I am happy to announce today the release of Woodswork Bench. Woodswork Bench is my latest personal project which provides a number of tools for the Microsoft Dynamics CRM community.

bench

Bench is a website which contains a collection of web based tools for working with Microsoft Dynamics CRM. These tools provide easy solutions to common MSCRM challenges. The initial release includes the following functionality:

  • Build URLs to open MSCRM forms.
  • Build URLs to open MSCRM views.
  • Finds the Guids hidden in MSCRM URLs.
  • Encoding and decoding of text.

Check it out here http://bench.woodswork.co.uk/.

I’m a relationship, I’m not a many to many, I’m not a lookup, what am I?

CRM has a two types of relationships:

  • One to many: a lookup on one entity, a grid on the other.
  • Many to many: a grid on both entities.

You are looking at a lookup. 90% of the lookups you see are simple, you can select one record of one entity type.

However, there are special system field lookups, namely the activity party. These muddy the waters a little. Some activity party lookups allow multiple record selections, some link to entities of multiple types. Which means you can have an activity party lookup with multiple records of multiple entity types. I suppose you could call this a “one to many (records) of many (entities)”.

For example on an email; the To field can be populated with multiple account and contact records. Whilst the From field can only have one record, but that can be a system user or queue. The To and From are both examples of activity party lookups.

To tell the difference programmatically you can use a RetrieveAttributeRequest. AttributeType shows if its an activity party, whilst Targets allows you see what record types are allowed in the lookup.

The following code shows how to do this for a couple of different fields.


RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest
{
EntityLogicalName = "email",
LogicalName = "to",
RetrieveAsIfPublished = true
};

RetrieveAttributeResponse result = Service.Execute(attributeRequest) as RetrieveAttributeResponse;

Trace.WriteLine("Email - To");
Trace.WriteLine("AttributeMetadata.AttributeType: " + result.AttributeMetadata.AttributeType);
Trace.WriteLine("LookupAttributeMetadata.Targets: " + ((LookupAttributeMetadata)result.AttributeMetadata).Targets.CollectionToString(", "));

attributeRequest = new RetrieveAttributeRequest
{
EntityLogicalName = "email",
LogicalName = "from",
RetrieveAsIfPublished = true
};

result = Service.Execute(attributeRequest) as RetrieveAttributeResponse;

Trace.WriteLine("Email - From");
Trace.WriteLine("AttributeMetadata.AttributeType: " + result.AttributeMetadata.AttributeType);
Trace.WriteLine("LookupAttributeMetadata.Targets: " + ((LookupAttributeMetadata)result.AttributeMetadata).Targets.CollectionToString(", "));

attributeRequest = new RetrieveAttributeRequest
{
EntityLogicalName = "account",
LogicalName = "parentaccountid",
RetrieveAsIfPublished = true
};

result = Service.Execute(attributeRequest) as RetrieveAttributeResponse;

Which outputs:

Email – To
AttributeMetadata.AttributeType: PartyList
LookupAttributeMetadata.Targets: account, contact, lead, queue, systemuser

Email – From
AttributeMetadata.AttributeType: PartyList
LookupAttributeMetadata.Targets: queue, systemuser

Account – Parent Account Id
AttributeMetadata.AttributeType: Lookup
LookupAttributeMetadata.Targets: account

Originally posted on StackExchange here.

CRM 2011 Rollup 15 and JavaScript Asynchronous Load Order

Those us who use multiple independent JavaScript web resources found that rollup 12 changed the way these were loaded. In particular that they loaded asynchronously and (most importantly) in no particular order. This meant that if you had file A which was dependent on some function in file B. If file A loaded before file B loaded, then file A would throw ‘”something” is undefined’ errors. The behaviour (and fixes) is expanded on in these posts: CRM 2011 Polaris Asynchronous Javascript Loading and Asynchronous loading of JavaScript Web Resources after U12/POLARIS.

At the time I struggled to find an official release from Microsoft commenting on this change – it seemed like a breaking change that caused issues in a number of deployments so I was surprised this wasn’t sign posted more explicitly (maybe I missed something in the release notes :|).

In any case it appears this may now be changing – at least in respect to load order. In the release notes of Rollup 15 under ‘Issues that are resolved in Update Rollup 15 for Microsoft Dynamics CRM 2011’ there is this little nugget:

Loading order of web resource script files is not respected after Update Rollup 12.

It’s difficult to tell exactly what this means and what change will occur, however it definitely suggests that the load order will now be respected (even if they do load asynchronously), which seems like a good thing.

Rockstar 365 – I don’t really get it (yet?)

I’ve recently started using Rockstar 365 which is all about scoring and ranking the best Microsoft professionals on the planet.

So initially I thought this sounded like quite a cool concept; you make a profile, add some project experience, blog/twitter links, exams and certificates, then go to sleep. You wake up the next day and hopefully you will have a rank respectable enough it doesn’t immediately send you scrambling to find the delete button.

As of writing I am currently #27 in the UK – first thoughts? I’m pretty great. 😛

However this immediately raises a few questions, primarily what does the 27 mean? 27th most experienced? Most valuable? Most skilled? Most certificated?

Continue reading

IronPython CRM 2011 Script for Checking Entity Audit Settings

Recently I needed to compare three different environments to see which entities were being audited. In the interests of making a boring task into an interesting task I decided to do this with an IronPython script.

I did this using Determination my IronPython/CRM 2011 tool, when given a connection string this will run through every entity in the environment letting you know which entity is being audited and which is not.

Continue reading

Microsoft Dynamics CRM 2011 Reporting

I recently acted as a technical reviewer for a new book; Microsoft Dynamics CRM 2011 Reporting by Damian Sinay. This book is now available from Packt Publishing so I thought I would publish a short review. (Note: I’m not paid by Packt for this role but I do get a free book).

Continue reading