+ Start a Discussion
jls_74_txjls_74_tx 

Update a text field onclick

I want to insert "yes" into a text field {!Referral__c.Viewed__c} when a user clicks an outputLink.  How do I do that?

 

Thank you in advance!

Rahul SharmaRahul Sharma

If you are doing this in visualforce page and in case if you don't have any controller for the page define one.
- Use apex:commandLink tag in visualforce page.

- Create method in controller or extension, and use that as Action in apex:commandLink for performing action.

 

You can display two types of link in visualforce:

- apex:outputLink: A link just for redirection to a URL behaves same as HTML anchor tag.

- command link: A link used for performing some action.

 

Your requirement was still not clear so i tried my best to answer this.

Hope it helps.