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 user 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

tttt
You might want to have javascript redirect to another page, for instance doing something like:

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


PeanutmanPeanutman
Hi TT,
 
When I tried this, I got a syntax error saying there is no field called 'frame.location'. Am I supposed to be substituting frame.location with something else?
 
Thanks for your help.
 
Eric