Search This Blog

Thursday, December 20, 2012

Did you notice the script finder?

Maybe you noticed there was a new tool in the toolbox. It’s a really simple one that displays all scripts referenced on all entities accross an organization. It is really useful when you arrive on a project without knowing what was really done on forms.

image

I will maybe add an export feature as I’m quite sure someone will ask for it.

Just an extra information: thanks to the toolbox, it took me only 30 minutes to develop this tool!

Downloading the toolbox and Assemblies error

It had to happen…

image

It seems that when downloading the toolbox, assemblies contained in the package are locked by Windows, if you copy/paste files from the archive directly. So, before running the tool, display assemblies properties and unblock them…

image

Or you can simply extract files from the archive using Windows extract built-in feature that seems to remove this lock.

Wednesday, December 19, 2012

Toolbox for Microsoft Dynamics CRM 2011 released!

Ok, I know what you think, previous post about this tool wasn’t necessary since I succeed to release the tool today. Well, yes, you are right…

Anyway, here is the toolbox, a single tool that will include all my tools. It comes with some of my best tools already included (other ones will follow later):

  • Attribute Bulk Updater
  • Iconator
  • Role Updater
  • Scripts Finder
  • SiteMap Editor
  • Solution Import
  • View Layout Replicator
  • WebResources Manager

I developed this toolbox because there was too much executables for all my tools and I wanted a way to ease the development of other tools.

As usual, it’s free and, hopefully, without major bugs (knocking wood…)

image

CodePlex web site includes a documentation page that explains how to create your own tools that can be included in this toolbox. Just by implementing a public interface of the tool, you will be able to develop your own tool without dealing with connection procedure and message display, it’s already managed by the toolbox. So, do not hesitate to create your own tool! I will be happy to list it on the CodePlex page.

Each tool is displayed with a logo (not required), a title, a description and an author

image

image

You just have to click on it to open it in a new tab (so that multiple tools can be opened in the toolbox). You will be prompted to decide if you need a connection to a CRM organization immediatly. If not, each action that requires a connection will open a connection dialog.

Let’s stop talking! Here is the CodePlex page!

Tuesday, December 18, 2012

Create a truly personal field with Field Level Security

Since Microsoft Dynamics CRM 2011 was released, I never had the chance to really use Field Level Security feature. Last week, I was asked to implement a secured field that should be accessed only by the owner of the record, even if the record itself can be accessed by anyone.
 
This can be achieved with one field level security profile and one plugin.
 
Field Level Security Profile
The field level security profile basically restrict Read and Update of the field to all users (or all teams) but allows Create. This way, anyone can create a record with access to the secure field. When created, as all users can’t read or update, the field is not accessible anymore.
 
Plugin
The plugin will handle this problem. On PostCreate event, it will share the secured field with the owner. For this, we use the entity PrincipalObjectAttributeAccess to give Read and Update access to the secured field to the owner of the record.

public void ShareSecureFieldWithOwner(Entity record)
{
    // Any method that helps you find the AttributeMetadata Id
    var attributeId = FindSecuredAttribute();

    if (attributeId != Guid.Empty)
    {
        var userAccess = new PrincipalObjectAttributeAccess
                             {
                                 AttributeId = attributeId,
                                 ObjectId = record.ToEntityReference(),
                                 PrincipalId = record.OwnerId,
                                 UpdateAccess = true,
                                 ReadAccess = true
                             };

        context.AddObject(userAccess);
        context.SaveChanges();
    }
}

Voilà! You have now a secure field accessible only for the owner of the record!

Monday, December 17, 2012

What's coming next...

Hi everybody,

It's a long time since I posted my last article on this blog. Well, I have a lot of work on many projects for our customers at Javista and not so much time to be active on this blog.

But I'm still working on my tools and the next one won't really be a new tool, more a toolbox. The idea is to have only one executable which will be able to embed all my previous tools, and more, tools that would be developed based on interfaces provided by this toolbox. The toolbox will handle all connection features, tool presentation and progress messages from tools.

This way, there will be only one tool in order to access many features. More, if you are using Windows 8 start screen, that means only one tile to access all tools.

image

Here is a preview of the UI (Image, Version, Author and description of each tool is handle by the tool itself, no by the toolbox)

image

The tool will surely be released before all my tools get converted to this new plugin system. I just hope it will be done in the coming month. Tools that are not yet converted will follow later.

You will then be able to develop your own plugin that will integrate smoothly in this toolbox.

Stay tuned for the release date!