Home > Download, Dynamics CRM 2011, Tools & Utilities, Visio > CRM 2011 Visio add-in: Org Chart for business units

CRM 2011 Visio add-in: Org Chart for business units

 

One of the problems when creating business unit structure in CRM 2011 is that you can’t visualize it. That’s why I created Visio 2010 add-in that connects to CRM Server, fetches all active business units and creates an org chart.

clip_image002

It’s a simple utility that can help you document your implementation and also help you figure out the security model and how changes in one business unit  can affect users in the other.

Compiled version of the add-in can be found on CodePlex: http://crmvisio.codeplex.com

Add-in requires installation of .NET Framework 4.0 (full, not the client profile).

How to use the add-in?

  1. Unzip the installation and run BusinessUnitOrgChart.vsto
  2. After the installation open up Visio 2010 and create an empty org chart diagram
  3. Switch to CRM 2011 Business Units tab and fill out the connection data
  4. Click Generate Org Chart and voilla!

If you find the add-in useful please provide feedback. I have some ideas for version 2, but I would like to hear your ideas as well.

  1. Ciaran
    10/02/2012 at 8:19 am | #1

    hi. i installed visio 2010 trial. When I try to run BusinessUnitOrgChart.vsto I get

    Name: BusinessUnitOrgChart
    From: file:///C:/Users/Administrator/Downloads/VisioBusinessUnits/BusinessUnitOrgChart.vsto

    ************** Exception Text **************
    System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for BusinessUnitOrgChart or its location is not trusted. Contact your administrator for further assistance.
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
    The Zone of the assembly that failed was:
    MyComputer

    • darkojo
      10/02/2012 at 2:11 pm | #2

      It seems it’s a trust issue. Open Visio properties, click Trust Center, click Trust Center Settings, click Addins and untick “Require Application Add-ins to be signed by Trusted Publisher”. I think this should do the trick.
      The problem is that this add-in wasn’t signed with an official code signing certificate (e.g. Verisign).

      Let me know if it works!

      • Ciaran
        10/02/2012 at 3:51 pm | #3

        Hi. That didn’t work as it was already unchecked. I tried adding the location of BusinessUnitOrgChart.vsto as a trusted location but no luck there either. Didn’t see any other option that might help. Any other ideas?

  2. Ciaran
    10/02/2012 at 3:52 pm | #4

    forgot to check the notify me box hence this post…

    • darkojo
      14/02/2012 at 10:43 am | #5

      Try this, in the app folder you have manifest file. Open it up in notepad (it’s an xml file) and at the end you have publisherIdentity element. Inside search and replace darko-pc\darko with your machine name and your username. I’m not sure if it works but give it a try.
      Let me know if it works.

  3. 14/02/2012 at 7:25 am | #6

    Hi Darko,

    I tried your add-in and It works great but I only get the chart for one of the children of the root business unit. For example, in the chart that is on your post, the yellow box shows the root business unit and there are two children in blue. In my case I only get one of the blue children and all its children. The other child and its children, and also the root business unit appear on top all together but not forming a chart and the boxes are white, no background colour.

    Any thoughts?

    Thanks

    • darkojo
      14/02/2012 at 10:31 am | #7

      Might be a bug in the recursion function that does the level structure. Could you please export your business unit structure to Excel and send it to me so I can test it? darko(at)infocumulus.com

      • darkojo
        15/02/2012 at 4:47 pm | #8

        I fixed it. The error was that the collection wasn’t sorted by levels.
        New version of addin: http://crmvisio.codeplex.com/releases/view/82350#DownloadId=342493

        Does it work now?

      • 16/02/2012 at 8:23 am | #9

        Great Darko!! It works like a charm now. Thanks!!

        Just note than I have installed it in a Virtual Machine. If I install it in my laptop I get the same error as Ciaran about the certificate not being trusted. I tried your suggested solution with no success. Let me know if you come up with another solution for that.

        Thanks again!

      • darkojo
        16/02/2012 at 10:18 am | #10

        I’m still working on that. I hope I will have a solution by next week.
        Thanks for posting and feedback.

        If you have any ideas for version 2.0 let me know.
        I was thinking about including security roles and teams because they are closely related to business units.

  4. elife
    20/02/2012 at 9:50 am | #11

    hi Darkojo
    thank you for sharing a useful tool like this …

    I am getting the same error that appear to “Ciaran” (first comment on this page)
    i tried your suggestion (replacing the pc name in the manifest) it didnt work even (shows a different issue that manifest is not valid).
    i am using ms contoso demo vpc for crm 2011.

  5. Ray
    20/02/2012 at 12:45 pm | #12

    Hi,
    this tools seems great, but I’m noto able to try it as I got this error (I’ve .NET 4 full and Visio 2010 installed:

    Name: BusinessUnitOrgChart
    From: file:///D:/BusinessUnitOrgChart/BusinessUnitOrgChart.vsto

    ************** Exception Text **************
    System.Deployment.Application.DeploymentDownloadException: Downloading file:///D:/BusinessUnitOrgChart/en/Microsoft.IdentityModel.resources.dll did not succeed. —> System.Net.WebException: Could not find file ‘D:\BusinessUnitOrgChart\en\Microsoft.IdentityModel.resources.dll’. —> System.Net.WebException: Could not find file ‘D:\BusinessUnitOrgChart\en\Microsoft.IdentityModel.resources.dll’. —> System.IO.FileNotFoundException: Could not find file ‘D:\BusinessUnitOrgChart\en\Microsoft.IdentityModel.resources.dll’.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
    at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
    at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    — End of inner exception stack trace —
    at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    at System.Net.FileWebRequest.GetResponseCallback(Object state)
    — End of inner exception stack trace —
    at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Net.FileWebRequest.GetResponse()
    at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    — End of inner exception stack trace —
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    can you please help me?

    Many thanks

    • 20/02/2012 at 11:46 pm | #13

      Hi Ray,

      Yes, I had the same problem, I forgot to mention it to Darko.
      The project is missing a dll. You can obtain this dll by installing Windows Identity Foundation. Or you might have it already installed.

      Check this folder in your computer:

      C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\en

      and see if the dll “Microsoft.IdentityModel.resources.dll” is there.

      If not, you can download and install WIF from here:

      http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17331

      Once installed, the dll should appear in the path above.

      Now you need to manually create a folder called “en” inside the “BusinessUnitOrgChart” folder and copy the dll in there.

      This worked for me.

      Good luck.

      Cheers!

      • elife
        21/02/2012 at 6:50 am | #14

        thanks , that worked for me.
        elife

      • Ray
        21/02/2012 at 9:46 am | #15

        Thanks a lot Chio, that worked!!!! ;)

      • darkojo
        22/02/2012 at 3:39 pm | #16

        Hi Chio and everyone,

        Thanks for debugging this. It turns out that I’m an idiot. In the release folder I had this en folder but I didn’t zip it! :)
        Sorry about that. I will update the solution in the CodePlex.

        Hope you find this utility useful.

  6. Kevin Dan
    21/02/2012 at 1:12 am | #17

    Hi Darkojo and Chio,

    I did copy the missing dll and folder over, but got this error:
    Name: BusinessUnitOrgChart
    From: file:///D:/CRM/BusinessUnitOrgChart/BusinessUnitOrgChart.vsto

    ************** Exception Text **************
    System.Deployment.Application.InvalidDeploymentException: File, Microsoft.IdentityModel.resources.dll, has a different computed hash than specified in manifest.
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    Can you please update the download package to include the missing dll?

    Thanks a lot!

  7. Kevin Dan
    23/02/2012 at 5:33 pm | #18

    darkojo :Hi Chio and everyone,
    Thanks for debugging this. It turns out that I’m an idiot. In the release folder I had this en folder but I didn’t zip it! Sorry about that. I will update the solution in the CodePlex.
    Hope you find this utility useful.

  8. Kevin Dan
    23/02/2012 at 5:36 pm | #19

    Hi Darko, Can you please update the solution in the CodePlex asap? I need create business units setup document and thank you for the tool.

  9. Kevin Dan
    24/02/2012 at 12:38 am | #20

    I downloaded the source code; after some project and code tweaks, I compiled the component and installed Visio addin without any issue. It works like a charm. Thanks!

    • darkojo
      05/03/2012 at 3:43 pm | #21

      I resolved the dll issue and created a new release on CodePlex!

  10. Peter Hale
    07/03/2012 at 12:36 am | #22

    You need to select properties on each file and unblock the fact the files were downloaded from the interent – no need to edit the manifest

    • Fredrik
      14/05/2012 at 11:43 am | #23

      Perfect! I didn’t see your reply initially, but as soon as I did I was finally able to install the add-on.
      Thanks!

  11. Chris
    27/03/2012 at 4:36 pm | #24

    Hi Darko,

    I’ve installed the latest version of your add-in and the deployment works.

    However, when I fill in my credentials and click “Generate Org Chart”, nothing happens. I have a blank org document sitting there and nothing is drawn.

    I am trying to connect to a online hosted CRM2011 org.

    Thanks.

  12. Karen
    17/04/2012 at 6:58 pm | #25

    Hi Darko,

    I would really like to use your program, but I haven’t been able to successfully run it. I do have .NET Framework 4 Full Profile, have updated the machine and user names, and am getting the following error msg:

    Name:
    From: file:///C:/Users/karen.stark/AppData/Local/Temp/Temp1_BusinessUnitOrgChart.zip/BusinessUnitOrgChart.vsto

    ************** Exception Text **************
    System.Deployment.Application.DeploymentDownloadException: Downloading file:///C:/Users/karen.stark/AppData/Local/Temp/Temp1_BusinessUnitOrgChart.zip/BusinessUnitOrgChart.dll.manifest did not succeed. —> System.Net.WebException: Could not find file ‘C:\Users\karen.stark\AppData\Local\Temp\Temp1_BusinessUnitOrgChart.zip\BusinessUnitOrgChart.dll.manifest’. —> System.Net.WebException: Could not find file ‘C:\Users\karen.stark\AppData\Local\Temp\Temp1_BusinessUnitOrgChart.zip\BusinessUnitOrgChart.dll.manifest’. —> System.IO.FileNotFoundException: Could not find file ‘C:\Users\karen.stark\AppData\Local\Temp\Temp1_BusinessUnitOrgChart.zip\BusinessUnitOrgChart.dll.manifest’.
    File name: ‘C:\Users\karen.stark\AppData\Local\Temp\Temp1_BusinessUnitOrgChart.zip\BusinessUnitOrgChart.dll.manifest’
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
    at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
    at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    — End of inner exception stack trace —
    at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    at System.Net.FileWebRequest.GetResponseCallback(Object state)
    — End of inner exception stack trace —
    at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Net.FileWebRequest.GetResponse()
    at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
    — End of inner exception stack trace —
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
    at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    Any assistance would be much appreciated. Thank you!

  1. 10/02/2012 at 5:33 am | #1
  2. 10/02/2012 at 5:52 am | #2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.