Pages

Wednesday, August 24, 2011

CRM 4.0 Explorer View

Ever faced the dilemma of knowing where to store/find your documentation? For more advanced document management features, we would recommend a Sharepoint integration methodology (in CRM 2011 it is a no brainer to use the SharePoint integration as that comes out of the box, but if for some reason you do not have SharePoint 2010 - SharePoint Foundation is free so there really should be no reason - you can follow this approach in CRM 2011 too although it will need some adaptation). But for those who have simple needs or have a smaller budget for solving such problems, the Explorer view provides a very simple straight forward solution to this problem. The screenshot below illustrates this concept. Users can navigate and update documentation right from CRM just as they would with Windows Explorer (identical user experience).


The following will step through configuration of the option (you can download referenced files from here):

ASPX Configuration

Create a shared folder root on one of the servers (e.g. \\<server>\CRMFiles). Make sure you grant the necessary access permissions. It is recommended that the root share location be a folder without spaces in the name.


Create a subfolder called "Test" under the root folder:


Open default.aspx and make the following changes (pay close attention to the number and placement of the “\” character):
  • On line 20 update the “src” tag to point to the correct share location (src=\\<server>\CRMFiles\)
  • On line 21 update the “ddf_src” tag to point to the correct share location (ddf_src="\\\server\CRMFiles">)
Copy the modified file from above to the \crmweb\ISV\Sentri\Explorer location on the CRM server:





Test the above by trying to connecting to your test folder:
http://<server>:<port>/ISV/Sentri/Explorer/default.aspx?FolderName=Test
If you do not get an explorer view returned similar to the above, you have made a mistake in the deployment steps – please review the steps until you get a successful explorer view returned.

CRM Entity Configuration

On the CRM entity where you wish to configure the Explorer to appear you will need to make the following changes.

Add an IFrame to the form with a name of IFRAME_DOCS (note this name can be anything but it must match the jscript code – see later in this document).  The recommended settings are shown in the screenshots below.




Open onload.js and make the following changes:
  • On line 5 update the logic for setting the folder name as necessary (see configuration section for more about this)
  • On line 6 update the share location (var netshare = "\\\\server\\CRMFiles\\";)
  • On line 7 ensure the url points to the correct path (should be if you followed the deployment instructions above)
Copy the onload.js into the form load event – you will need to ensure that the “fileshare()” function is called from somewhere in the onload jscript.

Configuration

In above implementation, there will need to be folder names under the share root matching the account name (assuming the jscript in  loaded in the account form). This of course can be modified as necessary to suit implementation requirements.

No comments:

Post a Comment