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
TraceyTracey 

Converting SControl to Visualforce Page

Could somebody please show me how to convert the scontrol below into a VisualForce page?

 


<a target="_blank" style="color: #000000; text-decoration: underline; font-family:'Arial','Helvetica',sans-serif;
font-size:75%;" href="http://www.linkedin.com/pub/dir/{!Contact.FirstName}/{!Contact.LastName}" >Get Contact Info</a>

 

 

Thanks

 

Stephen

wesnoltewesnolte

Hey

 

As far as i can see that's just an anchor tag right? The page would be something like

 

<apex:page standardcontroller="contact">

 

 <apex:outputLink arget="_blank" style="color: #000000; text-decoration: underline; font-family:'Arial','Helvetica',sans-serif;
font-size:75%;" value="http://www.linkedin.com/pub/dir/{!Contact.FirstName}/{!Contact.LastName}"

</apex:page>

 

This page would be quite bare with only a link on it, but the above code will do it. In order to populate the link correctly you would have to pass the page teh id of the contact in question i.e. your url would need to end in

 

/apex/pagename?id=[insert id here]

 

Cheers,

Wes

 

 

TraceyTracey

Hi Wes

 

Sorry but I don't quite understand the last bit

 

/apex/pagename?id=[insert id here]

 

Could you please send me an example of the whole solution?

 

This is what I have built so far

 

<apex:page standardController="contact">

<apex:outputLink target="_blank" style="color: #000000; text-decoration: underline; font-family:'Arial','Helvetica',sans-serif;
font-size:75%;" value="http://www.linkedin.com/pub/dir/{!Contact.FirstName}/{!Contact.LastName}"></apex:outputLink>
</apex:page>
wesnoltewesnolte

Hey

 

Let's say the page you've created is called myPage.page. You have a outputLink on a previous page that you click to navigate to myPage.page. The value attribute of the output like would be {!URLFOR($Page.myPage)}?id=01r800000008Mgg where 01r800000008Mgg is the Id of the contact you wish to work with.

 

Cheers,

Wes