-
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
Trailhead: Your Best Ally to Learn Salesforce
Salesforce is one of the most used platforms in the business ecosystem. That is why the skills required for its successful operation are growing rapidly.…
Salesforce Sales Cloud - Editions & Pricing Comparison
Editions in Sales Cloud – Essentials, Professional and Enterprise Salesforce Sales Cloud is an extremely powerful CRM for the management of your sales processes. Choosing this cloud…
Mission Three: Multi-Dimensional Quoting (MDQ) and Quote Line Groups | Salesforce CPQ
Video 3: Managing Subscription Products with Salesforce CPQ Mission Three: Multi-Dimensional Quoting (MDQ) & Quote Line Groups Hey, Salesforce enthusiasts! As promised, we are back…
Popular Salesforce Videos
Algoworks is Now a Salesforce Gold Partner
Being just a registered partner back in 2013, the journey to striking Gold in 2020 has been long. On the way to getting that Gold,…
Salesforce Winter Release '22 Highlights
Watch this webinar video to learn about new and improved features and how you can take full advantage of the latest enhancements. Let us know…
Salesforce and Slack: Success from Anywhere - Your Digital HQ
Welcome to Success from Anywhere: Your Digital HQ. Join our Slack-First Customer 360 event to find out more. Register now: https://www.salesforce.com/events-master/digital-hq/ Success Anywhere means coming…