+ Start a Discussion

Can I get a custom link to create a folder on our server if it doesn't already exist?

How can create a custom link or s-control that will check if a folder exists on my machine and if not create it?
I know that I can create a custom link that opens up an explorer window in a folder that I specify. I know that I can make this dynamic so for example, I could open the folder that corresponds to the name of the account I am looking at, by including the field name in the URL.  I think this will work if the folder already exits but if it does not already exist, how do I make this action create the folder with the predetermined folder name?
We can use this to support our quality process as I would like to set up a custom link that will automatically create a folder in our server that has the Account name and Case number so we can trace our customers proprietary information.
Any suggestions would be gratefully received.
The reason you can do this today is because a URL can point to an exisiting file location on your machine.  Of course, a URL cannot create a folder or file, so you can't use a custom link to solve this problem.

Your only option - and its ugly - is to create a signed ActiveX or Java applet that has local file system rights, and use that in an S-control to create the file.  I wouldn't recommend that path.

I'm interested in knowing if you have found a solution for creating a network folder from a custom link, if it does not exist?

We have a similar requirement.

You can't ordinarily do this from a web browser-- that's a security risk. You can generally configure most browsers to allow this type of access to the computer/network by using an ActiveX control, Java applet, or possibly even JavaScript.

Each browser that is trying to use the custom link would have to have the security bypassed (eg. configuring Salesforce to be in the Trusted Zone, allowing ActiveX controls access to the computer's resources, etc). I'm not clear on the details of doing this, but it sounds fairly non-trivial to try and set it up.

I would recommend you set up the server to lookup the folder and create it, if necessary. For example, the URL might be:


Using this method means that you'll get around whatever security might be in place on the browser, and you'll only have to rely on having security in the "getfolder" script on the server. This means less configuration and more security.

~ sfdcfox ~