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
D0ubleStakkedD0ubleStakked 

accessing a "Remote Site" in an S-Control

I have a product that will be delivered to my customers either hosted or at a client-site.
 
I am building an S-Control that will pull data from my product via a webservice & Salesforce's SSO.
 
Is there a way in the S-Control's native code that I can reference a "Remote Site"?
I can't hard-code the URL to my product, since it may be hosted in different locations for different clients.
 
Looking at the Google Calendar Mashup example, I see that the remote site is created, but then in the javascript example code, I also see hard-coded references to http://www.google.com
 
Hopefully there's a way to do what I'm looking for.
 
Thanks for any help you can offer,
-Brian
Ron HessRon Hess
you can replace the hard code url with a value that you store in the saleforce org for each customer.
so, some sort of "setup" object, with one record, with one field, which is the URL for that org.

i've seen this done, but not implemented it myself, should work.
D0ubleStakkedD0ubleStakked
is there any way to create a custom field for the $Organization ?
Ron HessRon Hess
no, sorry.
D0ubleStakkedD0ubleStakked

Thanks again for your help, Ron.

Are there any examples in the wiki or in other discussion board posts where someone has implemented validation to enforce only 1 record for a custom object?

Also - what would the best implementation of the data entry interface be for a system configuration object like this?  This doesn't really merit a custom tab, since its system configuration data, but I can't think of another way to implement the data entry interface. 

Any ideas?

Thanks,

-Brian

D0ubleStakkedD0ubleStakked

Per discussions with someone at Salesforce, he agreed with the Ron's recommended idea of creating a custom object to store the configuration data and to expose that custom object to only an Administrator through a custom tab.

-Brian