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
PeanutmanPeanutman 

Displaying an S-control rather than the URL

Hi All,
 
I created a web tab which references an S-Control. Below is the code:

 

{!CASE(User.Username,"name1@company.com", https://na1.salesforce.com/01N30000000CxNq,"name2@company.com", https://na1.salesforce.com/01N30000000CzZ0)}

 

The idea being if you are person 1 and you click on the web tab, you will see one s-control, and if you are person 2 and click on the web tab, you will see a different s-control.

 

While the logic is correct, instead of Salesforce.com actually displaying the s-control I want it the user to see, it simply shows the user the link the s-control I want the use to see.

 

What needs to be done in order to have the user see the s-control rather than seeing a link to the s-control?

 

Thanks,
Eric

 

 

michaelforcemichaelforce

To run an s-control, simply point the browser (either by directly setting the window location, or as a result of a click on a hyperlink) to the following address:

/servlet/servlet.Integration?lid=0000000000ABCDE

Obviously you need to put the ID of your s-control in there.

PeanutmanPeanutman
Hi Michael,
 
I tried this, but still no deal. While the syntax is correct, when I click the link, it does not 'run' the S-control, it simply shows the S-control on the screen rather than the HTML which is in the S-control.
 
Any other ideas or advice?
 
Thanks,
Eric