-
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
New Integration Alert — CRMJetty Salesforce Portal Gets Even More Powerful
Today, business organizations do not require a CRM system as the way of maintaining a relationship with a customer. They require solutions that would facilitate…
Purpose and Perks of Salesforce Subscription
As a business owner, you know customer relationships are key to success. You also understand that managing those relationships can be time-consuming and expensive. A…
Creating a Salesforce Extension: From Idea to Listing on Appexchange
With more than 6 million AppExchange installs, it's no wonder that 89% of Fortune 100 companies are using apps from Salesforce's AppExchange to get things done smoothly…
Popular Salesforce Videos
Introduction to Cloud Pages in Salesforce Marketing Cloud
Cameron Robert from Datarati introduces the Cloud Pages function in Salesforce Marketing Cloud and talks through the different Cloud Page types and how they can be…
Top 3 Reasons to Use Salesforce Checkout
Watch this video to understand your Salesforce contract information, make payments, and add additional licenses with Salesforce Checkout. This video discusses about the top 3…
The 3 Most Common Challenges Associated With B2b Commerce Cloud Implementations
With growing technology businesses are adapting to the new changes. B2B commerce cloud is one of them. But to implement the B2B commerce cloud is…

