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.

Advertisements

CRM 2013 Adding an On Change Event to a Grid View

Occasionally I’ve been asked how to add an on change event to a grid view, similar to an on load or save event, which will allow a developer to add some code to the page. As far as I know there is no “out of the box” supported way to do this, however I had a bit of brain wave this week and realised its possible with a ribbon (command) button (without using any unsupported customisations).

Capture

Continue reading

CRM 2013 Programmatically Comparing Security Roles

This code will print out all the differences between two given security roles. Useful when you need to sanity check your work or debug security issues.

Differences between Marketing Manager and Marketing Professional
Marketing Manager has prvActivateBusinessProcessFlow: Global
Marketing Manager has prvActivateSynchronousWorkflow: Global
Marketing Manager has prvAppendCompetitor: Global

Marketing Professional has prvActivateSynchronousWorkflow: User
Marketing Professional has prvAppendEmailTemplate: Bu

Continue reading

CRM 2013 Programmatically Comparing User Privileges

When debugging security issues it can be useful to compare the privileges of a functioning user with a non-functioning user.

The code in this post will print out all the privilege differences between two given users.

Differences between user1@gap.com and user2@gap.com
user1@gap.com has BU:root, PRIV:prvCreateAccount, DEPTH:Global
user1@gap.com has BU:root, PRIV:prvCreateActivity, DEPTH:Global
user1@gap.com has BU:root, PRIV:prvCreateArticle, DEPTH:Global

user2@gap.com has BU:sub, PRIV:prvCreateActivity, DEPTH:Deep
user2@gap.com has BU:sub, PRIV:prvCreateArticle, DEPTH:Global

Continue reading

CRM 2013 Check if all mandatory fields are populated with JavaScript

Today I needed to check if all fields on a given form were populated, as I didn’t know exactly which fields would be mandatory at any one time I need something that dynamically searched the form for all mandatory fields and checked to see if they had a value.

Fortunately this is actually pretty straight forward.

/**
Checks if all the mandatory fields are populated.

@method MandatoryPopulated
@return {bool} True if all fields are populated
**/
MandatoryPopulated: function() {
	populated = true;

	Xrm.Page.getAttribute(function (attribute, index) {
		if (attribute.getRequiredLevel() == "required") {
			if(attribute.getValue() === null) {
				populated = false;
			}
		}
	});
	
	return populated;
},

CRM 2013 Diagnosing “Access Is Denied” using Fiddler

I recently had to diagnose a CRM 2013 “Access Is Denied” message, back in the world of CRM 2011 this was pretty straight forward. CRM would present an option to download a log file and the log invariably pointed me in the right direction.

However I’ve found that CRM 2013 no longer presents the same option to download the log, you just get the generic error message with no further detailed information. As I was using CRM Online I was unable to check the server logs myself and I didn’t have time to contact Microsoft support.

Untitled

Continue reading