function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LarryHLarryH 

Pointing to Network Documents via S-Controls

Hi,

I am wondering if anyone can help me with a problem I am encountering:

I have created a custom tab that uses a custom s-control. The s-control contains links to documents, housed on our companys network server. I've tried using <a href='file:// etc..>name of link</a> to solve my problem, but the custom link doesn't load whatsoever. In my status bar, I do see that the links are correct - SFDC just doesn't forward the user to that page.

I've thought of creating a 'path' field and using a custom formula field to achieve this - i just didn't want to have to build another related list object. Any workarounds outside of using a href?

Thanks!

-Larry
werewolfwerewolf
Yes, there is a workaround.  Make a document that contains nothing but a META REFRESH to your local file location.

So basically your document would contain exactly this:
<meta http-equiv="refresh" content="0;url=file:////netdrive/directory/file.txt"/>

When you press the View link your browser will be transparently redirected to the local location of the file. Even the back button will work properly.

This is precisely what the Case Detachifier on the AppExchange does (except it does it with Attachments instead of documents, but same idea).


werewolfwerewolf
Incidentally if you were using Salesforce Content it would be even easier, you could just add a Web Link to your content repository and point it at that local file.

(or you could just plain put the file in Content too, which is really what it's for)
LarryHLarryH
hmmmm. the meta refresh isn't seeming like it is working... I may be performing it incorrectly...

The original idea was to use a simple HTML document as the s-control and just have links that point to the network content and either house it within the SFDC page or open a new page entirely. I may have to recreate this as a related list I am thinking, which wasn't my original intention...

If you have any other advice I'm open, but thanks!
werewolfwerewolf
Check your MIME type.  You should be storing it as text/html so that your browser interprets it properly.
LarryHLarryH
maybe this will help:

i literally built an s-control and wrote all the code within it. It has 4 links to the library of network files. There is a simple text explanation as well that describes what links to push as well. The example code is as follows:

<a href="file://cvres1/Cars/Direct%20Reporting/DMA/05%202008%20May">Monthly Searches and Contacts Trending Report by DMA</a>

<a href="file://cvres1/Cars/Direct%20Reporting/DMA/Search%20by%20County%20and%20Make">Monthly Searches Report by COUNTY and MAKE</a>

<a href="file://cvres1/Cars/Direct%20Reporting/Maps">Not sure which DMA your selling territory is in? Click here for MAPS</a>


it the status bar of my browser the links are correct - if i type the same links into my browser window, it loads the network page and shows me exactly what I need. My problem is pointing to these..

If anyone can show me, awesome! i'm not good with html :)


Message Edited by LarryH on 06-20-2008 08:50 AM
werewolfwerewolf
Try adding 2 more slashes.  file:////mydrive/dir/file.ext
LarryHLarryH
The problem seems to be linked to the new version of firefox... works fine in IE... The code would've worked fine the entire time - just outside of the firefox 3.0 upgrade. Werewolf, thanks a ton for helping me out! You are awesome!


Message Edited by LarryH on 06-20-2008 12:20 PM