You need to sign in to do that
Don't have an account?
BoolsEye
Reference javascript and images in S-Control
I am working on an AJAX application with S-controls which reference third party javascript libraries and images from a folder on the documents tab.
It works fine but when I upload my application to AppExchange and someone installs the application the file ids in the download urls change
"https://na1.salesforce.com/servlet/servlet.FileDownload?file=015300000005Gll"
"https://emea.salesforce.com/servlet/servlet.FileDownload?file=015300000006846"
Even the server name changes from n1.salesforce.com to emea.salesforce.com. How can I resolve this ?
Is this good practice or should I host the libraries and images on our own website.
I looked into the "Sforce Explorer" s-control and it includes javascript files from "http://sandbox.sforce.com/ajax/sforceExplorer/". What other options do I have in salesforce to upload files.
Thanks,
Juergen
It works fine but when I upload my application to AppExchange and someone installs the application the file ids in the download urls change
"https://na1.salesforce.com/servlet/servlet.FileDownload?file=015300000005Gll"
"https://emea.salesforce.com/servlet/servlet.FileDownload?file=015300000006846"
Even the server name changes from n1.salesforce.com to emea.salesforce.com. How can I resolve this ?
Is this good practice or should I host the libraries and images on our own website.
I looked into the "Sforce Explorer" s-control and it includes javascript files from "http://sandbox.sforce.com/ajax/sforceExplorer/". What other options do I have in salesforce to upload files.
Thanks,
Juergen
[script language="JavaScript" src="/servlet/servlet.FileDownload?file=01530000000IOtB"][/script]
I created an app package and uploaded it.
Within the demo account everything works fine but when I installed the package into a different account as a customer or different organization would do, the id behind the file= parameter changed. The javascript file was still there within one of the document folders but it had a different download file id.
If you say that it should stay the same when installing from AppExchange I will test it again, maybe I made a mistake.
Thanks,
// Juergen
so, yes they change upon install and, yes they should still work as you expect ( point to a document which also instlled by your app)
After the installation these images were missing so the ids inside documents are not re-mapped, only those in scontrols.
// Juergen