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
rajuraju 

URLs in S-Controls are NOT copied when installed via 'Get-It'

(1) We have account-1 (developer account on AppExchange) and as part of building a custom application (includes CustomTabs,CustomObjects,S-Controls), we also save some ICONS/Images as 'Documents' which are supposed to be used in S-control HTML as part of the presentation. For example, if the account-1 is hosted on na1.salesforce.com, the Documents were saves on the same domain. And, we had to hard-code the image-urls in S-control HTML which refer to na1.salesforce.com domain.

This works fine when the application was run within the same account.

(2) However, when the same app was packaged and published, the 'Get It' link would install on a different customer's account (ex: account-2). Now, if the account-2 happens to be hosted on na2.salesforce.com, the internal images links hardcoded in S-control HTMLs were NOT updated to na2.salesforce.com and it causes the DISPLAY PROBLEMS because those images were NOT found or can NOT be accessed from within na2.salesforce.com domain.

What is the solution for this problem?

Any quick help and tips would be greatly appreciated

Thank you
BlaxxunBlaxxun
try using relative path... say if the path to an image is
 
"https://na2.salesforce.com/images/show?id=000000"
 
use
 
"/images/show?id=000000"
 
same for any other file which is referenced in the code and hosted on the Salesforce.
 
 
rajuraju
I appreciate your response. We tried that. There was another occation where we had to hard-code these things inside our own JSPs which are running on our servers and we were thinking of finding the parent-frame's URL and use the domain accordingy ?

Thanks for your help.