A Matt Yates blog about all things CRM!

Create a simple file share in Microsoft Dynamics CRM 4.0

I came across this post on a Dynamics CRM in the field blog post about how to create a simple network file share in Microsoft Dynamics CRM 4.0. I have never experienced a need for it but there is a lot of potential and very minimal code for those who do not wish to pursue the SharePoint root.

The following scenario uses a network share for each of the CRM accounts. The network share is integrated through the use of an Iframe on a tab of the Account form and uses the Account name to dynamically point the Iframe to the correct network location. The solution assumes that the folder has already been created in the share and that the name exactly matches the Account name – obviously you could use a plugin to automate the creation of the network share.

Obviously this will not work over Internet Facing Deployments.

Here is how to set it up.

1. Create a network share and populate it with some folders that match your account names. Permissions can be set on the share per company requirements.


2. Open the Account customizations and then the main account form within CRM.

3. Create a Documents Tab on the Account Form and add a section to that tab.


4. Create an Iframe on the Documents tab with the following properties and Click OK.

NAME: IFRAME_documents
URL: \_static\blank.htm
ROW LAYOUT (Formatting Tab): Automatically expand to use available space



5. Add JavaScript on the Form Load event to dynamically set the Iframe URL. The network share path needs to be updated to match your environment.


//Only Run code after record has been created.
    switch (crmForm.FormType)

    //Extract Account Name and add it to network path.
    var acctName =;
    crmForm.all.IFRAME_document.src = ‘file://crmsrv/customerdocuments/’ + acctName;

6. Publish the Account form so the customizations take effect.

7. Now test to make sure the documents are displaying correctly. When you open the account form you will be able to see the related documents.



3 responses to “Create a simple file share in Microsoft Dynamics CRM 4.0

  1. Parvez Ghumra April 23, 2011 at 9:11 pm

    Neat solution! Wonder if it would work in 2011?

    Probably worth suggesting writing an additional plug-in to monitor the account name field which would keep the folder name in sync…and likewise, prevent modification of the target directory structure outside of CRM to avoid breaking this.

  2. Pingback: CRM 2011 – Partner source Microsoft Dynamics CRM 2011 Training Materials « Hosk's Dynamic CRM 2011 Blog

  3. Pingback: Dynamics CRM 4. « Roman's Blog

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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

%d bloggers like this: