web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Open Share network folder on Click of the field.

(0) ShareShare
ReportReport
Posted on by 943

Hi All,

I need to open windows explorer share path folder from MS CRM 2013 or MS CRM 2015 entity form on click of the link. As you know in CRM we have URL field data type but  according to me this is not capable of to open windows folder, here with this URL field you can only open http, https, ftp URL's  not windows folder URI (ex:  \\Comp\Sharefolder\). 

So what I did I created a field on CRM form and attached Onlcik event on the load of the form with this field.

At last am able to attach Onclick event on the field control and able to open the share path link on IE. But the same is not working for Google Chrome and Firefox, because ActiveXObject doesn't work forGoogle chrome and Firefox. 

Would you please help me to Open network share folder from CRM form in Chrome and Firefox or please let me know how to invoke ActiveX object from chrome and Firefox.

Below I am using ActiveXObject to open share file path and search the content in it and this is working for me in IE but not in Chrome and  Firefox.

function CallFunction()
{
var CaseNumber = Xrm.Page.getAttribute("new_casenumber").getValue();
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "search-ms:displayname=Search%20Results%20in%20Test%20Project%20MS%20CRM%202015%20(%5C%5CLR2XB2G)&crumb=System.Generic.String%3A" + CaseNumber + "&crumb=location:%5C%5CLR2XB2G%5CTest%20Project%20MS%20CRM%202015";
oShell.ShellExecute(commandtoRun, "", "", "open", "1");

}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bas van de Sande Profile Picture
    4,383 on at

    Hi Varun,

    please don't go that route!  ActiveX is a proprietary technology used by Microsoft. Google and Mozilla are not embracing this! Furthermore ActiveX only runs on windows.

    By referring to local fileshares you undermine the web based character of Dynamics CRM. Instead you should refer to web shares, where a webserver handles the file storage (e.g. SharePoint)

    Bas

  • Varun Singh Profile Picture
    943 on at

    Hi Bas,

    Yes you are right. But this is an existing set up where our CRM will be integrated with  share network folder where file is stored by another system in zip format. CRM work is to just read this folder file from CRM form and rest this folder is in control of other project where they will give us read privilege only.

    So need a solution to open Windows share folder from CRM form (chrome and firefox)

  • Bas van de Sande Profile Picture
    4,383 on at

    Hi Varun,

    how about writing a webservice that connects to the file share. From CRM you access the webservice to read the file(s).

    That way you are cross browser/ cross platform compatible

    Bas

  • Varun Singh Profile Picture
    943 on at

    Hi Bas,

    Yes I already thought earlier that is the last solution to call Webservice from form javascript if it won't work directly from Chrome and Firefox. Some how I wanted to make it work directly from form Link and wanted to get rid of  developing Web service effort.

    Need help in this regard.

  • Bas van de Sande Profile Picture
    4,383 on at

    Hi Varun,

    please forget this route!

    Invest in the effort to write a web service that handles the external file share.

    That's the only way to make your solution future proof

    Bas

  • Varun Singh Profile Picture
    943 on at

    Hi Bas,

    Yes I am doing this work with the help of webservice call. As I was facing problem with Firefox and Chrome to invoke ActiveX object.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Varun

    I have a scenario -to open share folder on button click.

    .which approach is correct.

    i follow  this URL: blog.zealots.solar;

    I have tried below code

    [ <a id="doclink"></a>

       <script language="javascript" type="text/javascript">

         var linkval = window.parent.Xrm.Page.data.entity.attributes.get("stsr_documents").getValue();

         var a = document.getElementById('doclink');

         a.href = "file:"+linkval;

       </script> ]  

    its not working when i am using above HTML code in web resource.

    could you please suggest me how we can do the same using web service.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans