-
Sample code for option button on VF page and getting value in apex class
Hi
I need to built a page with say two or more fields - their values will be Yes or No - based on if it is selected or not.
Get these field values in class and based on field values set variable values and call the function e.g:
VF Page:
Text1: Yes(it is a radio button)
Text2: Yes(radio)
call saveList from action button on VF page.
Apex Class:
Public String Cat
Public String Req
public PageReference saveList()
{if(Text1 == Yes):
Cat = 'abc'
Req = 'abc'
CallFunction(Cat,Req)
}
if(Text2 == 'Yes'){
Cat = 'def'
Req = 'def'
CallFunction(Cat,Req)
}
}
public void CallFuntion(String Cat, String Req)
{
statements;
}
Log In to reply.
Popular Salesforce Blogs
Decoding Ineffectiveness: Recognizing Red Flags in Your Salesforce Partner Relationship
When it comes to tech partnerships, teaming up with Salesforce partner is a big deal for customer relations. But let's be real - not every…
CRM- and Rule-Based Sitecore Personalization Improves Conversion Rates | Salesforce Case Study
In this article, we explain personalization driven by market research and show how a provider of clinical equipment tripled their traffic during the pandemic. Why…
CRM Software Development Company: Empowering Businesses with Custom CRM Solutions
In today’s highly competitive digital marketplace, customer relationships are more than just interactions—they're the foundation of success. Enter the CRM Software Development Company, the game-changer…
Popular Salesforce Videos
Installation & Configuration Process of Salesforce 9Calendar
This video demonstrates the installation, configuration, and working of our latest Salesforce app 9Calendar. Watch this video till the end to understand its functionalities. Adding…
Salesforce Validation Rules - Keep your Data Clean
Watch this short video for just over 2 minutes and learn how to keep your Salesforce data clean? The answer is simple: Use field validation…
Are Privacy laws anti-marketing? - Salesforce, GDPR and CCPA
Are Privacy laws anti-marketing? Or a great marketing opportunity for organizations? Perhaps the underlying question is: Is your Marketing outreach an unwanted nuisance? Or worse,…

